From fb555ff7dfc7ee0506d5834f7f13aa315c45041d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 15 Apr 2025 23:36:12 +0200 Subject: [PATCH] macOS: Lazily recreate theme palette on theme change QCocoaTheme::palette() lazily creates the system and role palette when needed, which we rely on for the initial palette values, so there's no need to recreate them explicitly during theme change, as the reset should be enough to recreate them the next time they are needed. Change-Id: I14f127e93554b8f97c06f1b88e6216be59124811 Reviewed-by: Timur Pocheptsov --- src/plugins/platforms/cocoa/qcocoatheme.mm | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm index 169d231fd39..52369f88815 100644 --- a/src/plugins/platforms/cocoa/qcocoatheme.mm +++ b/src/plugins/platforms/cocoa/qcocoatheme.mm @@ -245,9 +245,6 @@ void QCocoaTheme::handleSystemThemeChange() updateColorScheme(); - m_systemPalette = qt_mac_createSystemPalette(); - m_palettes = qt_mac_createRolePalettes(); - if (QCoreTextFontEngine::fontSmoothing() == QCoreTextFontEngine::FontSmoothing::Grayscale) { // Re-populate glyph caches based on the new appearance's assumed text fill color QFontCache::instance()->clear();