[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [filelight] src/part/radialMap: Fix the mouse over the center + tooltip, as well as adding a hint ab
From: Martin T. H. Sandsmark <martin.sandsmark () kde ! org>
Date: 2013-01-04 20:13:18
Message-ID: 20130104201318.44D9BA6091 () git ! kde ! org
[Download RAW message or body]
Git commit 97e853c4612a243110c501cffc1808c18678d0a1 by Martin T. H. Sandsmark.
Committed on 04/01/2013 at 21:12.
Pushed by sandsmark into branch 'master'.
Fix the mouse over the center + tooltip, as well as adding a hint about clicking to \
the tooltip
BUG: 248624
M +7 -2 src/part/radialMap/widgetEvents.cpp
http://commits.kde.org/filelight/97e853c4612a243110c501cffc1808c18678d0a1
diff --git a/src/part/radialMap/widgetEvents.cpp \
b/src/part/radialMap/widgetEvents.cpp index 8f3ce60..763d5d5 100644
--- a/src/part/radialMap/widgetEvents.cpp
+++ b/src/part/radialMap/widgetEvents.cpp
@@ -142,7 +142,7 @@ void RadialMap::Widget::mouseMoveEvent(QMouseEvent *e)
m_focus = segmentAt(p); //NOTE p is passed by non-const reference
- if (m_focus && m_focus->file() != m_tree)
+ if (m_focus)
{
if (m_focus != oldFocus) //if not same as last time
{
@@ -161,6 +161,11 @@ void RadialMap::Widget::mouseMoveEvent(QMouseEvent *e)
if (percent > 0) string += QString(QLatin1String( " (%1%)" \
)).arg(KGlobal::locale()->formatNumber(percent, 0)); }
+ const KUrl url = Widget::url(m_focus->file());
+ if (m_focus == m_rootSegment && url != url.upUrl()) {
+ string += i18n("\nClick to go up to parent directory");
+ }
+
QToolTip::showText(e->globalPos(), string, this);
emit mouseHover(m_focus->file()->fullPath());
@@ -276,7 +281,7 @@ section_two:
emit activated(url); //activate first, this will cause UI to prepare \
itself createFromCache((Folder *)m_focus->file());
}
- else
+ else if (url.upUrl() != url)
emit giveMeTreeFor(url.upUrl());
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic