Class: Systray

Inherits:
RubyQt6::Bando::QWidget
  • Object
show all
Defined in:
lib/clash-systray/app/views/systray.rb,
lib/clash-systray/app/views/systray/helpers.rb

Defined Under Namespace

Modules: Helpers

Instance Method Summary collapse

Constructor Details

#initializeSystray

Returns a new instance of Systray.



11
12
13
14
15
16
17
18
19
20
# File 'lib/clash-systray/app/views/systray.rb', line 11

def initialize
  super

  initialize_actions
  initialize_menus

  @systray = QSystemTrayIcon.new(self)
  @systray.set_icon(QApplication.window_icon)
  @systray.set_context_menu(@menu)
end

Instance Method Details

#showObject



22
23
24
# File 'lib/clash-systray/app/views/systray.rb', line 22

def show
  @systray.show
end