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 Change-Id: Ie1fe721387e64cb91ee5fc528667a63e6ddd6eed Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 550e511ec8a1aa12ac75ebd71079511572840065) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
@ -248,10 +248,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"
|
||||
)
|
||||
|
BIN
src/widgets/styles/images/closedock-down-macstyle-10.png
Normal file
After Width: | Height: | Size: 195 B |
BIN
src/widgets/styles/images/closedock-down-macstyle-20.png
Normal file
After Width: | Height: | Size: 344 B |
BIN
src/widgets/styles/images/closedock-down-macstyle-32.png
Normal file
After Width: | Height: | Size: 474 B |
BIN
src/widgets/styles/images/closedock-down-macstyle-48.png
Normal file
After Width: | Height: | Size: 721 B |
BIN
src/widgets/styles/images/closedock-down-macstyle-64.png
Normal file
After Width: | Height: | Size: 920 B |
BIN
src/widgets/styles/images/closedock-macstyle-10.png
Normal file
After Width: | Height: | Size: 309 B |
BIN
src/widgets/styles/images/closedock-macstyle-20.png
Normal file
After Width: | Height: | Size: 579 B |
BIN
src/widgets/styles/images/closedock-macstyle-32.png
Normal file
After Width: | Height: | Size: 938 B |
BIN
src/widgets/styles/images/closedock-macstyle-48.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/widgets/styles/images/closedock-macstyle-64.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
src/widgets/styles/images/dockdock-down-macstyle-10.png
Normal file
After Width: | Height: | Size: 246 B |
BIN
src/widgets/styles/images/dockdock-down-macstyle-20.png
Normal file
After Width: | Height: | Size: 363 B |
BIN
src/widgets/styles/images/dockdock-down-macstyle-32.png
Normal file
After Width: | Height: | Size: 416 B |
BIN
src/widgets/styles/images/dockdock-down-macstyle-48.png
Normal file
After Width: | Height: | Size: 622 B |
BIN
src/widgets/styles/images/dockdock-down-macstyle-64.png
Normal file
After Width: | Height: | Size: 771 B |
BIN
src/widgets/styles/images/dockdock-macstyle-10.png
Normal file
After Width: | Height: | Size: 339 B |
BIN
src/widgets/styles/images/dockdock-macstyle-20.png
Normal file
After Width: | Height: | Size: 555 B |
BIN
src/widgets/styles/images/dockdock-macstyle-32.png
Normal file
After Width: | Height: | Size: 654 B |
BIN
src/widgets/styles/images/dockdock-macstyle-48.png
Normal file
After Width: | Height: | Size: 915 B |
BIN
src/widgets/styles/images/dockdock-macstyle-64.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
@ -6091,14 +6091,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;
|
||||
}
|
||||
|