Tooltip text is also set on menu creation, if necessary

This commit is contained in:
nathan 2018-01-24 17:33:56 +01:00
parent f1abfbe360
commit 1dc97f1825

View File

@ -124,9 +124,10 @@ class _SwingTray extends Tray {
popupMenu.pack();
popupMenu.setFocusable(true);
// appindicators DO NOT support anything other than PLAIN gtk-menus (which we hack to support swing menus)
// they ALSO do not support tooltips, so we cater to the lowest common denominator
// trayIcon.setToolTip("app name");
// appindicators DO NOT support anything other than PLAIN gtk-menus, which do not support tooltips
if (tooltipText != null && !tooltipText.isEmpty()) {
trayIcon.setToolTip(tooltipText);
}
trayIcon.addMouseListener(new MouseAdapter() {
@Override