Add high-resolution pixmaps for macOS dock widget title icons
The macOS style falls back to the QCommonStyle for those, and that style loads the macstyle pixmaps. Weird, but cleaning that up is for another commit. Fixes: QTBUG-38776 Pick-to: 6.1 6.2 5.15 Change-Id: Ie1fe721387e64cb91ee5fc528667a63e6ddd6eed Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>bb10
|
|
@ -246,10 +246,30 @@ qt_internal_add_resource(Widgets "qstyle"
|
|||
${qstyle_resource_files}
|
||||
)
|
||||
set(qstyle1_resource_files
|
||||
"styles/images/closedock-down-macstyle-10.png"
|
||||
"styles/images/closedock-down-macstyle-16.png"
|
||||
"styles/images/closedock-down-macstyle-20.png"
|
||||
"styles/images/closedock-down-macstyle-32.png"
|
||||
"styles/images/closedock-down-macstyle-48.png"
|
||||
"styles/images/closedock-down-macstyle-64.png"
|
||||
"styles/images/closedock-macstyle-10.png"
|
||||
"styles/images/closedock-macstyle-16.png"
|
||||
"styles/images/closedock-macstyle-20.png"
|
||||
"styles/images/closedock-macstyle-32.png"
|
||||
"styles/images/closedock-macstyle-48.png"
|
||||
"styles/images/closedock-macstyle-64.png"
|
||||
"styles/images/dockdock-down-macstyle-10.png"
|
||||
"styles/images/dockdock-down-macstyle-16.png"
|
||||
"styles/images/dockdock-down-macstyle-20.png"
|
||||
"styles/images/dockdock-down-macstyle-32.png"
|
||||
"styles/images/dockdock-down-macstyle-48.png"
|
||||
"styles/images/dockdock-down-macstyle-64.png"
|
||||
"styles/images/dockdock-macstyle-10.png"
|
||||
"styles/images/dockdock-macstyle-16.png"
|
||||
"styles/images/dockdock-macstyle-20.png"
|
||||
"styles/images/dockdock-macstyle-32.png"
|
||||
"styles/images/dockdock-macstyle-48.png"
|
||||
"styles/images/dockdock-macstyle-64.png"
|
||||
"styles/images/toolbar-ext-macstyle.png"
|
||||
"styles/images/toolbar-ext-macstyle@2x.png"
|
||||
)
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 195 B |
|
After Width: | Height: | Size: 344 B |
|
After Width: | Height: | Size: 474 B |
|
After Width: | Height: | Size: 721 B |
|
After Width: | Height: | Size: 920 B |
|
After Width: | Height: | Size: 309 B |
|
After Width: | Height: | Size: 579 B |
|
After Width: | Height: | Size: 938 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 246 B |
|
After Width: | Height: | Size: 363 B |
|
After Width: | Height: | Size: 416 B |
|
After Width: | Height: | Size: 622 B |
|
After Width: | Height: | Size: 771 B |
|
After Width: | Height: | Size: 339 B |
|
After Width: | Height: | Size: 555 B |
|
After Width: | Height: | Size: 654 B |
|
After Width: | Height: | Size: 915 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
|
@ -6094,14 +6094,14 @@ QIcon QCommonStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption
|
|||
case SP_TitleBarNormalButton:
|
||||
case SP_TitleBarCloseButton: {
|
||||
QIcon titleBarIcon;
|
||||
if (standardIcon == SP_TitleBarCloseButton) {
|
||||
titleBarIcon.addFile(QStringLiteral(":/qt-project.org/styles/macstyle/images/closedock-macstyle-16.png"));
|
||||
titleBarIcon.addFile(QStringLiteral(":/qt-project.org/styles/macstyle/images/closedock-down-macstyle-16.png"),
|
||||
QSize(16, 16), QIcon::Normal, QIcon::On);
|
||||
} else {
|
||||
titleBarIcon.addFile(QStringLiteral(":/qt-project.org/styles/macstyle/images/dockdock-macstyle-16.png"));
|
||||
titleBarIcon.addFile(QStringLiteral(":/qt-project.org/styles/macstyle/images/dockdock-down-macstyle-16.png"),
|
||||
QSize(16, 16), QIcon::Normal, QIcon::On);
|
||||
QString prefix = standardIcon == SP_TitleBarCloseButton
|
||||
? QStringLiteral(":/qt-project.org/styles/macstyle/images/closedock-")
|
||||
: QStringLiteral(":/qt-project.org/styles/macstyle/images/dockdock-");
|
||||
for (const auto size : dockTitleIconSizes) {
|
||||
titleBarIcon.addFile(prefix + QStringLiteral("macstyle-") + QString::number(size) + iconPngSuffix(),
|
||||
QSize(size, size), QIcon::Normal, QIcon::Off);
|
||||
titleBarIcon.addFile(prefix + QStringLiteral("down-macstyle-") + QString::number(size) + iconPngSuffix(),
|
||||
QSize(size, size), QIcon::Normal, QIcon::On);
|
||||
}
|
||||
return titleBarIcon;
|
||||
}
|
||||
|
|
|
|||