QCommonStyle: Multiple icon sizes for more Windows stock icons

Change-Id: I842270b922e019bdef0bb65efaf4a08db10c511e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
bb10
Frank Richter 2015-09-15 23:41:36 +02:00 committed by Frank Richter
parent 8d59ef4b79
commit 3118f0b6b0
1 changed files with 5 additions and 7 deletions

View File

@ -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<QPlatformTheme::StandardPixmap>(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<QPlatformTheme::StandardPixmap>(standardIcon);
QPixmap pixmap = theme->standardPixmap(sp, QSizeF(32, 32));
icon.addPixmap(pixmap);
}
break;
default:
break;
}