From dcaacf90454957258908cc48ba2840cb5fe3613b Mon Sep 17 00:00:00 2001 From: Nathan Mattes Date: Thu, 2 Jan 2025 12:36:54 +0100 Subject: [PATCH] Use image instead of color to make tint-colors work (#2368) --- DcWidget/DcWidget.swift | 6 +++--- deltachat-ios.xcodeproj/project.pbxproj | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/DcWidget/DcWidget.swift b/DcWidget/DcWidget.swift index d338de6bc..07c6ea339 100644 --- a/DcWidget/DcWidget.swift +++ b/DcWidget/DcWidget.swift @@ -49,9 +49,10 @@ struct ChatShortcutView: View { if let image = chat.image { Image(uiImage: image) .fullColor() - } else { + } else if let colorImage = UIImage(color: chat.color) { ZStack { - Color(uiColor: chat.color) + Image(uiImage: colorImage) + .fullColor() Text(chat.title.first?.uppercased() ?? "🫶") .foregroundStyle(.white) .font(.system(size: 34)) @@ -94,4 +95,3 @@ extension Image { } } } - diff --git a/deltachat-ios.xcodeproj/project.pbxproj b/deltachat-ios.xcodeproj/project.pbxproj index 2ce30a1a8..1eb7e0e2d 100644 --- a/deltachat-ios.xcodeproj/project.pbxproj +++ b/deltachat-ios.xcodeproj/project.pbxproj @@ -215,6 +215,7 @@ D8083AD02D14384F005DCB7D /* UserDefaults+Widgets.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8083ACF2D14384F005DCB7D /* UserDefaults+Widgets.swift */; }; D8083AD12D143868005DCB7D /* UserDefaults+Widgets.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8083ACF2D14384F005DCB7D /* UserDefaults+Widgets.swift */; }; D80F62792B59D1CC00877059 /* DefaultReactions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D80F62782B59D1CC00877059 /* DefaultReactions.swift */; }; + D82AD20F2D26B087009D6026 /* UIImage+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78E45E4321D3F14A00D4B15E /* UIImage+Extension.swift */; }; D84738D22BBC1C2C00ECD52B /* LegacyMenuItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D84738D12BBC1C2C00ECD52B /* LegacyMenuItem.swift */; }; D84AED242B55E8EB00D753F6 /* ReactionsOverviewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D84AED232B55E8EB00D753F6 /* ReactionsOverviewViewController.swift */; }; D84AED272B566C0700D753F6 /* ReactionsOverviewTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D84AED262B566C0700D753F6 /* ReactionsOverviewTableViewCell.swift */; }; @@ -1829,6 +1830,7 @@ buildActionMask = 2147483647; files = ( D89C45732D0B0166005B1491 /* WidgetEntry.swift in Sources */, + D82AD20F2D26B087009D6026 /* UIImage+Extension.swift in Sources */, D8083AD12D143868005DCB7D /* UserDefaults+Widgets.swift in Sources */, D8C7B6982CF87F5E003A6AD1 /* DcMsg+Extension.swift in Sources */, );