summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-05-22 10:49:32 +0200
committerJens Bache-Wiig <jbache@trolltech.com>2009-05-22 10:53:23 +0200
commit5cd9be6c2702ce1f4292003ac3e864f08a0311f3 (patch)
treea0022cf550c617cfcb60366d49422a80a4d2697e /src/gui
parentc8e632f96a942590ab9936d136dcf2f7eb17fef8 (diff)
Fix toolbutton text incorrectly clipped on windows
In 4.5 the toolbutton icon rendering was changed somewhat and the bottom line of text for tool buttons icons with TextUnderIcon set is incorrectly clipped on Windows. The style reserves only 5 pixels but tries to use 6 pixels for text and icon spacing, hence we adjust the text rect one pixel up. This should be safe considering the fact that we have a margin on both sides of the icon already and avoids actually moving the icon positioning. Task-number: 252554 Reviewed-by: trond
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/styles/qcommonstyle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index 3cae08ab8c..f3d153722a 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -1693,7 +1693,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
if (toolbutton->toolButtonStyle == Qt::ToolButtonTextUnderIcon) {
pr.setHeight(pmSize.height() + 6);
- tr.adjust(0, pr.height(), 0, -3);
+ tr.adjust(0, pr.height() - 1, 0, -3);
pr.translate(shiftX, shiftY);
if (!hasArrow) {
drawItemPixmap(p, pr, Qt::AlignCenter, pm);