add bg color to theme

fix tapping on main view empty space not working
update charts
This commit is contained in:
Trey t
2022-02-23 10:26:49 -06:00
parent d88c4e7a05
commit 7ecd104871
4 changed files with 46 additions and 18 deletions

View File

@@ -48,12 +48,17 @@ enum Theme: Int, CaseIterable {
protocol Themeable {
static var title: String { get }
var secondaryBGColor: Color { get }
var bgColor: Color { get }
var bg: AnyView { get }
var preview: AnyView { get }
var labelColor: Color { get }
}
struct IFeelTheme: Themeable {
var bgColor: Color {
return Color(uiColor: UIColor.systemBackground)
}
var labelColor: Color {
return Color(uiColor: UIColor.label)
}
@@ -63,7 +68,7 @@ struct IFeelTheme: Themeable {
}
var secondaryBGColor: Color {
return Color(uiColor: UIColor.systemBackground)
return Color(uiColor: UIColor.secondarySystemBackground)
}
var bg: AnyView {
@@ -84,6 +89,10 @@ struct IFeelTheme: Themeable {
}
struct SystemTheme: Themeable {
var bgColor: Color {
return Color(uiColor: UIColor.systemBackground)
}
var labelColor: Color {
return Color(uiColor: UIColor.label)
}
@@ -118,6 +127,10 @@ struct SystemTheme: Themeable {
}
struct AlwaysDark: Themeable {
var bgColor: Color {
return Color(uiColor: UIColor.systemBackground.resolvedColor(with: .init(userInterfaceStyle: .dark)))
}
var labelColor: Color {
return .white
}
@@ -152,6 +165,10 @@ struct AlwaysDark: Themeable {
}
struct AlwaysLight: Themeable {
var bgColor: Color {
return Color(uiColor: UIColor.systemBackground)
}
var labelColor: Color {
return .black
}