From 3118f0b6b0d16fdb5a34a210aff47b916068fa2e Mon Sep 17 00:00:00 2001 From: Frank Richter Date: Tue, 15 Sep 2015 23:41:36 +0200 Subject: [PATCH] QCommonStyle: Multiple icon sizes for more Windows stock icons Change-Id: I842270b922e019bdef0bb65efaf4a08db10c511e Reviewed-by: Friedemann Kleint --- src/widgets/styles/qcommonstyle.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index a14ca84388..f639e4a082 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -5597,6 +5597,11 @@ QIcon QCommonStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption case SP_FileLinkIcon: case SP_DesktopIcon: case SP_ComputerIcon: + case SP_VistaShield: + case SP_MessageBoxInformation: + case SP_MessageBoxWarning: + case SP_MessageBoxCritical: + case SP_MessageBoxQuestion: if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) { QPlatformTheme::StandardPixmap sp = static_cast(standardIcon); for (int size = 16 ; size <= 32 ; size += 16) { @@ -5620,13 +5625,6 @@ QIcon QCommonStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption } } break; - case SP_VistaShield: - if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) { - QPlatformTheme::StandardPixmap sp = static_cast(standardIcon); - QPixmap pixmap = theme->standardPixmap(sp, QSizeF(32, 32)); - icon.addPixmap(pixmap); - } - break; default: break; }