Skip to content

Commit

Permalink
fix: linux system tray tooltip (GopeedLab#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyWie authored Oct 21, 2023
1 parent 256faf2 commit 74c9491
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 4 additions & 0 deletions ui/flutter/lib/util/util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ class Util {
return !kIsWeb && Platform.isMacOS;
}

static isLinux() {
return !kIsWeb && Platform.isLinux;
}

static isWeb() {
return kIsWeb;
}
Expand Down

0 comments on commit 74c9491

Please sign in to comment.