summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-09-17 13:52:50 +0200
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-09-30 18:33:16 +0200
commitbe1635e2d6a4e42f3f828e7831e5dbf867ba161d (patch)
treebc1f60cd2aac0c56e7ecfa8baddb78e4431ea554 /src
parentc74c548af3059ec479911efe371575b878480835 (diff)
Don't dpi-scale -1 pixel metrics
It may be rounded down to 0, thus losing its magic value. Task-number: QTBUG-41324 Change-Id: I5a5b98bb24bd0478c10940a90a7dc691e2663f4d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/styles/qfusionstyle.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index 2747722b94..8d7ca42934 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -3083,8 +3083,7 @@ int QFusionStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, co
val = 2;
break;
case PM_MaximumDragDistance:
- val = -1;
- break;
+ return -1; // Do not dpi-scale because the value is magic
case PM_TabCloseIndicatorWidth:
case PM_TabCloseIndicatorHeight:
val = 20;
@@ -3099,8 +3098,7 @@ int QFusionStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, co
val = 2;
break;
case PM_SubMenuOverlap:
- val = -1;
- break;
+ return -1; // Do not dpi-scale because the value is magic
case PM_DockWidgetHandleExtent:
case PM_SplitterWidth:
val = 4;
@@ -3121,7 +3119,6 @@ int QFusionStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, co
break;
case PM_DefaultFrameWidth:
return 1; // Do not dpi-scale because the drawn frame is always exactly 1 pixel thick
- break;
default:
return QCommonStyle::pixelMetric(metric, option, widget);
}