mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-07 00:50:27 +00:00
fix: linux system tray tooltip (#243)
This commit is contained in:
2 files changed
+8
-1
No files matched your search
@@ -202,7 +202,10 @@ class AppController extends GetxController with WindowListener, TrayListener {
|
||||
onClick: (menuItem) => {windowManager.destroy()},
|
||||
),
|
||||
]);
|
||||
await trayManager.setToolTip('Gopeed');
|
||||
if (!Util.isLinux()) {
|
||||
// Linux seems not support setToolTip, refer to: https://github.com/GopeedLab/gopeed/issues/241
|
||||
await trayManager.setToolTip('Gopeed');
|
||||
}
|
||||
await trayManager.setContextMenu(menu);
|
||||
trayManager.addListener(this);
|
||||
}
|
||||
|
||||
@@ -93,6 +93,10 @@ class Util {
|
||||
return !kIsWeb && Platform.isMacOS;
|
||||
}
|
||||
|
||||
static isLinux() {
|
||||
return !kIsWeb && Platform.isLinux;
|
||||
}
|
||||
|
||||
static isWeb() {
|
||||
return kIsWeb;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user