fix: linux system tray tooltip (#243)

This commit is contained in:
Levi authored and GitHub committed 2023-10-21 16:29:15 +08:00
1 parent 256faf2cbd
commit 74c9491893
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);
}
+4
View File
@@ -93,6 +93,10 @@ class Util {
return !kIsWeb && Platform.isMacOS;
}
static isLinux() {
return !kIsWeb && Platform.isLinux;
}
static isWeb() {
return kIsWeb;
}