┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-01-09 21:42:48 +0000
committerPeter Penz <[email protected]>2008-01-09 21:42:48 +0000
commitfa042ee797596ee41ec6a48d938907577c2504ec (patch)
tree4ca1363c7daf68815d0e2cd05879be48de76bf2a /src
parent600fd01bc2d667a99265da07e0bf4d028d14e7f7 (diff)
Only increase the height of the statusbar for long texts if the message type is not DolphinStatusBar::Default (otherwise the layout of the icons view might get changed when hovering items).
svn path=/trunk/KDE/kdebase/apps/; revision=759053
Diffstat (limited to 'src')
-rw-r--r--src/statusbarmessagelabel.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/statusbarmessagelabel.cpp b/src/statusbarmessagelabel.cpp
index 7bc9f8fbd..e24a59add 100644
--- a/src/statusbarmessagelabel.cpp
+++ b/src/statusbarmessagelabel.cpp
@@ -229,15 +229,20 @@ void StatusBarMessageLabel::assureVisibleText()
return;
}
- // calculate the required height of the widget thats
- // needed for having a fully visible text
- QFontMetrics fontMetrics(font());
- const QRect bounds(fontMetrics.boundingRect(0, 0, availableTextWidth(), height(),
- Qt::AlignVCenter | Qt::TextWordWrap,
- m_text));
- int requiredHeight = bounds.height();
- if (requiredHeight < m_minTextHeight) {
- requiredHeight = m_minTextHeight;
+ int requiredHeight = m_minTextHeight;
+ if (m_type != DolphinStatusBar::Default) {
+ // Calculate the required height of the widget thats
+ // needed for having a fully visible text. Note that for the default
+ // statusbar type (e. g. hover information) increasing the text height
+ // is not wanted, as this might rearrange the layout of items.
+
+ QFontMetrics fontMetrics(font());
+ const QRect bounds(fontMetrics.boundingRect(0, 0, availableTextWidth(), height(),
+ Qt::AlignVCenter | Qt::TextWordWrap, m_text));
+ requiredHeight = bounds.height();
+ if (requiredHeight < m_minTextHeight) {
+ requiredHeight = m_minTextHeight;
+ }
}
// Increase/decrease the current height of the widget to the