mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +00:00
[ios] Made dark appearance colors actually dark and match the system more
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
@@ -33,6 +33,6 @@ class SettingsBridgeController: UIHostingController<SettingsView> {
|
|||||||
class ProfileBridgeController: UIHostingController<ProfileView> {
|
class ProfileBridgeController: UIHostingController<ProfileView> {
|
||||||
required init?(coder aDecoder: NSCoder) {
|
required init?(coder aDecoder: NSCoder) {
|
||||||
super.init(coder: aDecoder, rootView: ProfileView())
|
super.init(coder: aDecoder, rootView: ProfileView())
|
||||||
self.view.tintColor = .alternativeAccent
|
self.view.tintColor = .toolbarAccent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class DayColors: IColors {
|
|||||||
class NightColors: IColors {
|
class NightColors: IColors {
|
||||||
var clear = UIColor.clear
|
var clear = UIColor.clear
|
||||||
var primaryDark = UIColor(25, 30, 35, alpha100)
|
var primaryDark = UIColor(25, 30, 35, alpha100)
|
||||||
var primary = UIColor(45, 50, 55, alpha100)
|
var primary = UIColor.accent
|
||||||
var secondary = UIColor(0x25, 0x28, 0x2b, alpha100)
|
var secondary = UIColor(0x25, 0x28, 0x2b, alpha100)
|
||||||
// Light green color
|
// Light green color
|
||||||
var primaryLight = UIColor(65, 70, 75, alpha100)
|
var primaryLight = UIColor(65, 70, 75, alpha100)
|
||||||
@@ -71,7 +71,7 @@ class NightColors: IColors {
|
|||||||
var tabBarButtonBackground = UIColor(60, 64, 68, alpha70)
|
var tabBarButtonBackground = UIColor(60, 64, 68, alpha70)
|
||||||
var downloadBadgeBackground = UIColor(230, 70, 60, alpha100)
|
var downloadBadgeBackground = UIColor(230, 70, 60, alpha100)
|
||||||
// Background color && press color
|
// Background color && press color
|
||||||
var pressBackground = UIColor(50, 54, 58, alpha100)
|
var pressBackground = UIColor(28, 28, 30, alpha100)
|
||||||
// Red color (use for status closed in place page)
|
// Red color (use for status closed in place page)
|
||||||
var red = UIColor(230, 70, 60, alpha100)
|
var red = UIColor(230, 70, 60, alpha100)
|
||||||
var errorPink = UIColor(246, 60, 51, alpha26)
|
var errorPink = UIColor(246, 60, 51, alpha26)
|
||||||
@@ -88,7 +88,7 @@ class NightColors: IColors {
|
|||||||
var blackHintText = UIColor(255, 255, 255, alpha30)
|
var blackHintText = UIColor(255, 255, 255, alpha30)
|
||||||
var blackDividers = UIColor(255, 255, 255, alpha08)
|
var blackDividers = UIColor(255, 255, 255, alpha08)
|
||||||
var solidDividers = UIColor(84, 86, 90, alpha100)
|
var solidDividers = UIColor(84, 86, 90, alpha100)
|
||||||
var white = UIColor(60, 64, 68, alpha100)
|
var white = UIColor(34, 34, 36, alpha100)
|
||||||
var whitePrimaryText = UIColor(255, 255, 255, alpha87)
|
var whitePrimaryText = UIColor(255, 255, 255, alpha87)
|
||||||
var whitePrimaryTextHighlighted = UIColor(255, 255, 255, alpha30)
|
var whitePrimaryTextHighlighted = UIColor(255, 255, 255, alpha30)
|
||||||
var whiteSecondaryText = UIColor(0, 0, 0, alpha70)
|
var whiteSecondaryText = UIColor(0, 0, 0, alpha70)
|
||||||
|
|||||||
@@ -11,24 +11,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"idiom" : "universal"
|
"idiom" : "universal"
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"color" : {
|
|
||||||
"color-space" : "srgb",
|
|
||||||
"components" : {
|
|
||||||
"alpha" : "1.000",
|
|
||||||
"blue" : "0.482",
|
|
||||||
"green" : "0.737",
|
|
||||||
"red" : "0.486"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"idiom" : "universal"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"info" : {
|
||||||
|
|||||||
@@ -5,9 +5,27 @@
|
|||||||
"color-space" : "srgb",
|
"color-space" : "srgb",
|
||||||
"components" : {
|
"components" : {
|
||||||
"alpha" : "1.000",
|
"alpha" : "1.000",
|
||||||
"blue" : "0.788",
|
"blue" : "0.247",
|
||||||
"green" : "0.875",
|
"green" : "0.396",
|
||||||
"red" : "0.784"
|
"red" : "0.216"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0.482",
|
||||||
|
"green" : "0.737",
|
||||||
|
"red" : "0.486"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"idiom" : "universal"
|
"idiom" : "universal"
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0.788",
|
||||||
|
"green" : "0.875",
|
||||||
|
"red" : "0.784"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -76,6 +76,6 @@ struct RoutingOptionsView: View {
|
|||||||
.onChange(of: shouldAvoidMotorwaysWhileRouting) { changedShouldAvoidMotorwaysWhileRouting in
|
.onChange(of: shouldAvoidMotorwaysWhileRouting) { changedShouldAvoidMotorwaysWhileRouting in
|
||||||
Settings.shouldAvoidMotorwaysWhileRouting = changedShouldAvoidMotorwaysWhileRouting
|
Settings.shouldAvoidMotorwaysWhileRouting = changedShouldAvoidMotorwaysWhileRouting
|
||||||
}
|
}
|
||||||
.accentColor(.alternativeAccent)
|
.accentColor(.toolbarAccent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,12 +29,13 @@
|
|||||||
[self.openLabel setHidden:result.openStatusText.length == 0];
|
[self.openLabel setHidden:result.openStatusText.length == 0];
|
||||||
[self setStyleNameAndApply:@"Background"];
|
[self setStyleNameAndApply:@"Background"];
|
||||||
[self.iconImageView setStyleNameAndApply:@"BlueBackground"];
|
[self.iconImageView setStyleNameAndApply:@"BlueBackground"];
|
||||||
self.iconImageView.image = [UIImage imageNamed:result.iconImageName];
|
self.iconImageView.image = [[UIImage imageNamed:result.iconImageName] imageWithTintColor:UIColor.white];
|
||||||
self.separatorInset = UIEdgeInsetsMake(0, kSearchCellSeparatorInset, 0, 0);
|
self.separatorInset = UIEdgeInsetsMake(0, kSearchCellSeparatorInset, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)layoutSubviews {
|
- (void)layoutSubviews {
|
||||||
[super layoutSubviews];
|
[super layoutSubviews];
|
||||||
|
self.iconImageView.image = [self.iconImageView.image imageWithTintColor:UIColor.white];
|
||||||
[self.iconImageView.layer setCornerRadius:self.iconImageView.height / 2];
|
[self.iconImageView.layer setCornerRadius:self.iconImageView.height / 2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ struct ExistingProfileView: View {
|
|||||||
} label: {
|
} label: {
|
||||||
Text("osm_profile_remove")
|
Text("osm_profile_remove")
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
|
.foregroundStyle(.alternativeAccent)
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
}
|
}
|
||||||
.buttonStyle(BorderedButtonStyle())
|
.buttonStyle(BorderedButtonStyle())
|
||||||
@@ -146,6 +147,7 @@ struct ExistingProfileView: View {
|
|||||||
} label: {
|
} label: {
|
||||||
Text("osm_more_about")
|
Text("osm_more_about")
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
|
.foregroundStyle(.alternativeAccent)
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
}
|
}
|
||||||
.buttonStyle(BorderedButtonStyle())
|
.buttonStyle(BorderedButtonStyle())
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ struct NoExistingProfileView: View {
|
|||||||
.padding(.top, 6)
|
.padding(.top, 6)
|
||||||
|
|
||||||
Text("osm_profile_explanation")
|
Text("osm_profile_explanation")
|
||||||
|
.tint(.alternativeAccent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.padding(.bottom)
|
.padding(.bottom)
|
||||||
@@ -67,6 +68,7 @@ struct NoExistingProfileView: View {
|
|||||||
} label: {
|
} label: {
|
||||||
Text("osm_profile_register")
|
Text("osm_profile_register")
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
|
.foregroundStyle(.alternativeAccent)
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
}
|
}
|
||||||
.buttonStyle(BorderedButtonStyle())
|
.buttonStyle(BorderedButtonStyle())
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ struct SettingsNavigationView: View {
|
|||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
}
|
}
|
||||||
.buttonStyle(BorderedButtonStyle())
|
.buttonStyle(BorderedButtonStyle())
|
||||||
|
.foregroundStyle(.alternativeAccent)
|
||||||
.padding([.top, .bottom])
|
.padding([.top, .bottom])
|
||||||
.listRowInsets(.init(top: 0, leading: 0, bottom: 0, trailing: 0))
|
.listRowInsets(.init(top: 0, leading: 0, bottom: 0, trailing: 0))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -310,6 +310,6 @@ struct SettingsView: View {
|
|||||||
.onReceive(Settings.syncStatePublisher) { syncState in
|
.onReceive(Settings.syncStatePublisher) { syncState in
|
||||||
isSyncPossible = syncState.isAvailable
|
isSyncPossible = syncState.isAvailable
|
||||||
}
|
}
|
||||||
.accentColor(.alternativeAccent)
|
.accentColor(.toolbarAccent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user