fix trayicon-tooltip for linux
[quassel.git] / src / qtui / legacysystemtray.cpp
index 0c6a1e3..9176dbd 100644 (file)
@@ -64,9 +64,16 @@ void LegacySystemTray::init() {
 void LegacySystemTray::syncLegacyIcon() {
   _trayIcon->setIcon(stateIcon());
 
+#if defined Q_WS_MAC || defined Q_WS_WIN
+  QString tooltip = QString("%1").arg(toolTipTitle());
+  if(!toolTipSubTitle().isEmpty())
+    tooltip += QString("\n%1").arg(toolTipSubTitle());
+#else
   QString tooltip = QString("<b>%1</b>").arg(toolTipTitle());
   if(!toolTipSubTitle().isEmpty())
     tooltip += QString("<br>%1").arg(toolTipSubTitle());
+#endif
+
   _trayIcon->setToolTip(tooltip);
 }
 
@@ -106,7 +113,7 @@ void LegacySystemTray::setState(State state_) {
   State oldstate = state();
   SystemTray::setState(state_);
   if(oldstate != state()) {
-    if(state() == NeedsAttention && mode() == Legacy)
+    if(state() == NeedsAttention && mode() == Legacy && animationEnabled())
       _blinkTimer.start();
     else {
       _blinkTimer.stop();