summaryrefslogtreecommitdiffstats
path: root/src/designer
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-03-04 10:51:34 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-03-06 15:16:18 +0100
commite49cb9684f09571b0c81ba2298ebd665d31b9bd5 (patch)
treea247bd7c135f09f743c5451205697601088b1073 /src/designer
parent2c4e8847de53c133452cce51afc204e02c9e0d1b (diff)
Qt Designer: Disable theme icons for macOS
The mix of system icons and Designer's icons is perceived to look a bit off. Pick-to: 6.7 Change-Id: I684b5f4411d750850b288c2bb6f35bee057a0728 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/designer')
-rw-r--r--src/designer/src/lib/shared/iconloader.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/designer/src/lib/shared/iconloader.cpp b/src/designer/src/lib/shared/iconloader.cpp
index 042b3da34..ecb97ba2b 100644
--- a/src/designer/src/lib/shared/iconloader.cpp
+++ b/src/designer/src/lib/shared/iconloader.cpp
@@ -4,6 +4,7 @@
#include "iconloader_p.h"
#include <QtCore/qfile.h>
+#include <QtCore/qoperatingsystemversion.h>
#include <QtGui/qicon.h>
#include <QtGui/qpixmap.h>
@@ -16,7 +17,8 @@ namespace qdesigner_internal {
QDESIGNER_SHARED_EXPORT QIcon createIconSet(QIcon::ThemeIcon themeIcon,
QLatin1StringView name)
{
- return QIcon::hasThemeIcon(themeIcon)
+ return QOperatingSystemVersion::currentType() != QOperatingSystemVersion::MacOS
+ && QIcon::hasThemeIcon(themeIcon)
? QIcon::fromTheme(themeIcon) : createIconSet(name);
}