Change in plasma-framework[master]: Unify when tooltips are shown and kept alive.

David Edmundson (Code Review) noreply at kde.org
Tue Feb 10 14:26:19 UTC 2015


David Edmundson has uploaded a new change for review.

  https://gerrit.vesnicky.cesnet.cz/r/365

Change subject: Unify when tooltips are shown and kept alive.
......................................................................

Unify when tooltips are shown and kept alive.

A new tooltip would only be shown if it had content to show.

However in the old code if the tooltip was already visible we would keep
the tooltip alive and sync with empty contents regardless of whether we
had anything to show.

This seems to clear up the system tray where we have nested tooltip
areas for the tray applet and the icon itself and things would flicker

Change-Id: I7d9ded9edb70672c572e008c8d6f1ffe2d76b773
Changelog: Avoid showing an empty tooltip
---
M src/declarativeimports/core/tooltip.cpp
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.vesnicky.cesnet.cz:29418/plasma-framework refs/changes/65/365/1

diff --git a/src/declarativeimports/core/tooltip.cpp b/src/declarativeimports/core/tooltip.cpp
index 987dc96..76ae49f 100644
--- a/src/declarativeimports/core/tooltip.cpp
+++ b/src/declarativeimports/core/tooltip.cpp
@@ -304,6 +304,9 @@
         return;
     }
 
+    if (!m_mainItem && mainText().isEmpty() && subText().isEmpty()) {
+        return;
+    }
     if (tooltipDialogInstance()->isVisible()) {
         // We signal the tooltipmanager that we're "potentially interested,
         // and ask to keep it open for a bit, so other items get the chance
@@ -312,7 +315,7 @@
         tooltipDialogInstance()->keepalive();
         //FIXME: showToolTip needs to be renamed in sync or something like that
         showToolTip();
-    } else if (m_mainItem || !mainText().isEmpty() || !subText().isEmpty()) {
+    } else {
         m_showTimer->start(m_interval);
     }
 }

-- 
To view, visit https://gerrit.vesnicky.cesnet.cz/r/365
To unsubscribe, visit https://gerrit.vesnicky.cesnet.cz/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d9ded9edb70672c572e008c8d6f1ffe2d76b773
Gerrit-PatchSet: 1
Gerrit-Project: plasma-framework
Gerrit-Branch: master
Gerrit-Owner: David Edmundson <david at davidedmundson.co.uk>


More information about the Plasma-devel mailing list