Dark mode for fallback images

This commit is contained in:
Jackson Harper 2023-12-14 10:28:21 +08:00
parent 1e07a63c09
commit f80a57b652
5 changed files with 83 additions and 4 deletions

View file

@ -48,6 +48,9 @@ public extension Color {
static var thFeatureSeparator: Color { Color("featureSeparator", bundle: .module) }
static var thFallbackImageForeground: Color { Color("thFallbackImageForeground", bundle: .module) }
static var thFallbackImageBackground: Color { Color("thFallbackImageBackground", bundle: .module) }
static var circleButtonBackground: Color { Color("_circleButtonBackground", bundle: .module) }
static var circleButtonForeground: Color { Color("_circleButtonForeground", bundle: .module) }
static var extensionBackground: Color { Color("_extensionBackground", bundle: .module) }

View file

@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xED",
"green" : "0xED",
"red" : "0xED"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x3C",
"green" : "0x3C",
"red" : "0x3C"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View file

@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x2A",
"green" : "0x2A",
"red" : "0x2A"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFE"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View file

@ -123,10 +123,10 @@ public struct GridCard: View {
.multilineTextAlignment(.leading)
.lineLimit(2)
.padding(10)
.foregroundColor(Color.themeMiddleGray)
.foregroundColor(Color.thFallbackImageForeground)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Color.thLightWhiteGrey)
.background(Color.thFallbackImageBackground)
.frame(width: geo.size.width, height: geo.size.height)
}
}

View file

@ -81,10 +81,10 @@ public struct LibraryFeatureCard: View {
.multilineTextAlignment(.leading)
.lineLimit(2)
.padding(10)
.foregroundColor(Color.themeMiddleGray)
.foregroundColor(Color.thFallbackImageForeground)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Color.thLightWhiteGrey)
.background(Color.thFallbackImageBackground)
.frame(width: 146, height: 90)
}