Skip to content

Commit

Permalink
Use image instead of color to make tint-colors work (#2368)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitschlag committed Jan 2, 2025
1 parent 5fd7b6a commit dcaacf9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DcWidget/DcWidget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -94,4 +95,3 @@ extension Image {
}
}
}

2 changes: 2 additions & 0 deletions deltachat-ios.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -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 */,
);
Expand Down

0 comments on commit dcaacf9

Please sign in to comment.