From 11b1ced7cdc2af028164381d43c146ec79919f19 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 26 Oct 2009 15:55:16 +0100 Subject: Do not hardecode the ToolBar Icon Size So we correctly get the size from the platform plugin Reviewed-by: jbache --- src/gui/styles/qcommonstyle.cpp | 2 +- src/gui/styles/qplastiquestyle.cpp | 3 --- src/gui/styles/qwindowsstyle.cpp | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 5886512..b871842 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -4661,7 +4661,7 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid case PM_ToolBarIconSize: ret = qt_guiPlatformPlugin()->platformHint(QGuiPlatformPlugin::PH_ToolBarIconSize); if (!ret) - ret = proxy()->pixelMetric(PM_SmallIconSize, opt, widget); + ret = int(QStyleHelper::dpiScaled(24.)); break; case PM_TabBarIconSize: diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp index ce2109a..1f77d90 100644 --- a/src/gui/styles/qplastiquestyle.cpp +++ b/src/gui/styles/qplastiquestyle.cpp @@ -5514,9 +5514,6 @@ int QPlastiqueStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, case PM_MenuHMargin: ret = 0; break; - case PM_ToolBarIconSize: - ret = 24; - break; case PM_ButtonShiftHorizontal: case PM_ButtonShiftVertical: ret = 1; diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp index 0f72440..5cf738e 100644 --- a/src/gui/styles/qwindowsstyle.cpp +++ b/src/gui/styles/qwindowsstyle.cpp @@ -454,9 +454,6 @@ int QWindowsStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, const QW ret = proxy()->pixelMetric(PM_LargeIconSize, opt, widget); break; - case PM_ToolBarIconSize: - ret = int(QStyleHelper::dpiScaled(24.)); - break; case PM_DockWidgetTitleMargin: ret = int(QStyleHelper::dpiScaled(2.)); break; -- cgit v0.12