@@ -76,3 +76,44 @@ index 6b33d94d58c..867389e4c93 100644
7676 }
7777
7878 void QCocoaWindow::updateSafeAreaMarginsIfNeeded()
79+ diff --git a/src/gui/platform/darwin/qappleiconengine.mm b/src/gui/platform/darwin/qappleiconengine.mm
80+ index 5d03782..c9a84b2 100644
81+ --- a/src/gui/platform/darwin/qappleiconengine.mm
82+ +++ b/src/gui/platform/darwin/qappleiconengine.mm
83+ @@ -360,25 +360,67 @@ auto *configuredImage(const NSImage *image, const QColor &color)
84+ auto *config = [NSImageSymbolConfiguration configurationWithPointSize:48
85+ weight:NSFontWeightRegular
86+ scale:NSImageSymbolScaleLarge];
87+
88+ - config = [config configurationByApplyingConfiguration:
89+ - [NSImageSymbolConfiguration configurationWithPaletteColors:@[
90+ - [NSColor colorWithSRGBRed:color.redF() green:color.greenF()
91+ - blue:color.blueF() alpha:color.alphaF()]
92+ - ]]];
93+
94+ + if (@available(macOS 12.0, *)) {
95+ + NSColor *tintColor = [NSColor colorWithSRGBRed:color.redF()
96+ + green:color.greenF()
97+ + blue:color.blueF()
98+ + alpha:color.alphaF()];
99+ + NSImageSymbolConfiguration *paletteCfg =
100+ + [NSImageSymbolConfiguration configurationWithPaletteColors:@[ tintColor ]];
101+ +
102+ + config = [config configurationByApplyingConfiguration:paletteCfg];
103+ + }
104+
105+ - config = [config configurationByApplyingConfiguration:
106+ - [NSImageSymbolConfiguration configurationPreferringMonochrome]];
107+
108+ + if (@available(macOS 12.0, *)) {
109+ + if (@available(macOS 13.0, *)) {
110+ + NSImageSymbolConfiguration *monoCfg =
111+ + [NSImageSymbolConfiguration configurationPreferringMonochrome];
112+ +
113+ + config = [config configurationByApplyingConfiguration:monoCfg];
114+ + }
115+ + }
116+
117+ return [image imageWithSymbolConfiguration:config];
118+ }
119+
0 commit comments