mirror of
https://github.com/Stremio/stremio-shell-ng.git
synced 2026-01-11 22:40:32 +00:00
Make tray behave like on old shell
This commit is contained in:
parent
e88653974b
commit
baac009fb5
2 changed files with 2 additions and 2 deletions
|
|
@ -47,7 +47,7 @@ pub struct MainWindow {
|
|||
#[nwg_events( OnWindowClose: [Self::on_quit(SELF, EVT_DATA)], OnInit: [Self::on_init], OnPaint: [Self::on_paint], OnMinMaxInfo: [Self::on_min_max(SELF, EVT_DATA)], OnWindowMinimize: [Self::transmit_window_state_change], OnWindowMaximize: [Self::transmit_window_state_change] )]
|
||||
pub window: nwg::Window,
|
||||
#[nwg_partial(parent: window)]
|
||||
#[nwg_events((tray_exit, OnMenuItemSelected): [nwg::stop_thread_dispatch()], (tray_show_hide, OnMenuItemSelected): [Self::on_show_hide], (tray_topmost, OnMenuItemSelected): [Self::on_toggle_topmost]) ]
|
||||
#[nwg_events((tray, MousePressLeftUp): [Self::on_show_hide], (tray_exit, OnMenuItemSelected): [nwg::stop_thread_dispatch()], (tray_show_hide, OnMenuItemSelected): [Self::on_show_hide], (tray_topmost, OnMenuItemSelected): [Self::on_toggle_topmost]) ]
|
||||
pub tray: SystemTray,
|
||||
#[nwg_partial(parent: window)]
|
||||
pub webview: WebView,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ pub struct SystemTray {
|
|||
#[nwg_resource(source_embed: Some(&data.embed), source_embed_str: Some("MAINICON"))]
|
||||
pub tray_icon: nwg::Icon,
|
||||
#[nwg_control(icon: Some(&data.tray_icon), tip: Some("Stremio"))]
|
||||
#[nwg_events(MousePressLeftUp: [Self::show_menu], OnContextMenu: [Self::show_menu])]
|
||||
#[nwg_events(OnContextMenu: [Self::show_menu])]
|
||||
pub tray: nwg::TrayNotification,
|
||||
#[nwg_control(popup: true)]
|
||||
pub tray_menu: nwg::Menu,
|
||||
|
|
|
|||
Loading…
Reference in a new issue