mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Updated compound icons to match ios 26 designs
This commit is contained in:
@@ -68,7 +68,7 @@ public struct ListRowLabel<Icon: View>: View {
|
||||
case error
|
||||
}
|
||||
|
||||
var iconAlignment: VerticalAlignment = .center
|
||||
var iconAlignment: VerticalAlignment = .top
|
||||
var hideIconBackground = false
|
||||
|
||||
enum Layout { case `default`, centered, avatar }
|
||||
@@ -98,14 +98,26 @@ public struct ListRowLabel<Icon: View>: View {
|
||||
|
||||
var iconForegroundColor: Color {
|
||||
guard isEnabled else { return .compound.iconTertiaryAlpha }
|
||||
if role == .destructive { return .compound.textCriticalPrimary }
|
||||
return hideIconBackground ? .compound.iconPrimary : .compound.iconTertiaryAlpha
|
||||
if role == .destructive { return .compound.iconCriticalPrimary }
|
||||
if hideIconBackground {
|
||||
return .compound.iconTertiaryAlpha
|
||||
} else {
|
||||
if #available(iOS 26, *) {
|
||||
return .compound.iconSecondary
|
||||
} else {
|
||||
return .compound.iconPrimary
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var iconBackgroundColor: Color {
|
||||
if hideIconBackground { return .clear }
|
||||
guard isEnabled else { return .compound._bgSubtleSecondaryAlpha }
|
||||
return role == .destructive ? .compound._bgCriticalSubtleAlpha : .compound._bgSubtleSecondaryAlpha
|
||||
if #available(iOS 26, *) {
|
||||
return .clear
|
||||
} else {
|
||||
guard isEnabled else { return .compound._bgSubtleSecondaryAlpha }
|
||||
return role == .destructive ? .compound._bgCriticalSubtleAlpha : .compound._bgSubtleSecondaryAlpha
|
||||
}
|
||||
}
|
||||
|
||||
public var body: some View {
|
||||
@@ -207,7 +219,7 @@ public struct ListRowLabel<Icon: View>: View {
|
||||
description: String? = nil,
|
||||
icon: Icon,
|
||||
role: ListRowLabel.Role? = nil,
|
||||
iconAlignment: VerticalAlignment = .center) -> ListRowLabel {
|
||||
iconAlignment: VerticalAlignment = .top) -> ListRowLabel {
|
||||
ListRowLabel(title: title,
|
||||
description: description,
|
||||
icon: icon,
|
||||
@@ -219,7 +231,7 @@ public struct ListRowLabel<Icon: View>: View {
|
||||
description: String? = nil,
|
||||
icon: KeyPath<CompoundIcons, Image>,
|
||||
role: ListRowLabel.Role? = nil,
|
||||
iconAlignment: VerticalAlignment = .center) -> ListRowLabel where Icon == CompoundIcon {
|
||||
iconAlignment: VerticalAlignment = .top) -> ListRowLabel where Icon == CompoundIcon {
|
||||
.default(title: title,
|
||||
description: description,
|
||||
icon: CompoundIcon(icon),
|
||||
@@ -231,7 +243,7 @@ public struct ListRowLabel<Icon: View>: View {
|
||||
description: String? = nil,
|
||||
systemIcon: SFSymbol,
|
||||
role: ListRowLabel.Role? = nil,
|
||||
iconAlignment: VerticalAlignment = .center) -> ListRowLabel where Icon == Image {
|
||||
iconAlignment: VerticalAlignment = .top) -> ListRowLabel where Icon == Image {
|
||||
.default(title: title,
|
||||
description: description,
|
||||
icon: Image(systemSymbol: systemIcon),
|
||||
@@ -303,6 +315,7 @@ public struct ListRowLabel<Icon: View>: View {
|
||||
description: description,
|
||||
icon: icon,
|
||||
role: role,
|
||||
iconAlignment: .center,
|
||||
layout: .avatar)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0ee44e47bddf3eef7bb5596623adf613e929dd2a7ba30b31ad8b0b3110126a75
|
||||
size 97423
|
||||
oid sha256:11d9f056506f89b9301ce3a0e5d260f4961536064e8434ca74bfc585dfc77d9b
|
||||
size 95617
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bcd094069e63b3facd6550d2f0d0db99aa6cdd4735ccc2d15861eb7eb9c9d25e
|
||||
size 50658
|
||||
oid sha256:ab965eabfa2e5370749bd3774c4142565fd28f4d15ccc0b53e97ac4bf2e103ff
|
||||
size 49122
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:82772eb033bbbcd890f2fc4029430ba9436d9643535a73c4f368151149537edc
|
||||
size 398298
|
||||
oid sha256:bef0c9ab32f1adba85168d05108e619d419b342b9bcb898a0c7276b902b235a7
|
||||
size 385067
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:de442478c2e805ffda381d0e309e16558dee99d6834fa76bd454138db0c1fb7a
|
||||
size 265583
|
||||
oid sha256:a66a464c92bd93c90734f45ce9d30592d93e912bd57cb5a75684dc84e2ce06ac
|
||||
size 255496
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5f78bedc262cac32ac78a88aa97389efb3feffe971c829a198dd4382e2d2ef26
|
||||
size 191878
|
||||
oid sha256:b7cc6ec91513e4b31079a3ba2ef8ab1eaa214b373f616d492ca73dfa891f30fd
|
||||
size 190190
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:902dc2ba25af3501bab1533a20c7b07f798345424dffde546d3f1784f0c87fb8
|
||||
size 131625
|
||||
oid sha256:5f9dcb57f9bbfca8be9d0cb7ca350a6c4be960816abb200ff63dc2836b555433
|
||||
size 132035
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:eb23e6eee9e97c5010f02701f7e070107f58a8ede27df959868136424c68c982
|
||||
size 79857
|
||||
oid sha256:acfb01682b484e788e3fd8f883977baaf488cc7cea84da845fbe0bab8185733d
|
||||
size 79822
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7c7bd42f422ea34f0f75c1fe482beb2c90cc70b5abdfc017519ca94560dc196a
|
||||
size 39548
|
||||
oid sha256:8857d2a0cc92634cf7f55390e9fd5a3b23bc496ebc25c2bd4fb660bb191c04d1
|
||||
size 39502
|
||||
|
||||
Reference in New Issue
Block a user