host card appearance tweak
This commit is contained in:
1 parent
17a9fa39f5
commit
77955f6bd6
2 files changed
+8
-2
No files matched your search
@@ -493,6 +493,9 @@ static const float REFRESH_CYCLE = 2.0f;
|
|||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (bool)isDarkTheme{
|
||||||
|
return self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark;
|
||||||
|
}
|
||||||
|
|
||||||
- (void) updateLoop {
|
- (void) updateLoop {
|
||||||
// Stop immediately if the view has been detached
|
// Stop immediately if the view has been detached
|
||||||
@@ -517,9 +520,9 @@ static const float REFRESH_CYCLE = 2.0f;
|
|||||||
_statusLabel.text = [LocalizationHelper localizedStringForKey:@"Online"];
|
_statusLabel.text = [LocalizationHelper localizedStringForKey:@"Online"];
|
||||||
self.statusIcon.image = [[UIImage imageNamed:@"wifi_green"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
self.statusIcon.image = [[UIImage imageNamed:@"wifi_green"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
||||||
self.statusIcon.hidden = NO;
|
self.statusIcon.hidden = NO;
|
||||||
_hostIconView.tintColor = [UIColor whiteColor];
|
|
||||||
_appButton.titleLabel.font = [UIFont systemFontOfSize:buttonLabelFontSize];
|
_appButton.titleLabel.font = [UIFont systemFontOfSize:buttonLabelFontSize];
|
||||||
if(host.pairState == PairStatePaired){
|
if(host.pairState == PairStatePaired){
|
||||||
|
_hostIconView.tintColor = [UIColor whiteColor];
|
||||||
_iconBackgroundView.backgroundColor = defaultBlue;
|
_iconBackgroundView.backgroundColor = defaultBlue;
|
||||||
lockIconView.hidden = YES;
|
lockIconView.hidden = YES;
|
||||||
[_appButton setTitle:[LocalizationHelper localizedStringForKey:@"Applications"] forState:UIControlStateNormal];
|
[_appButton setTitle:[LocalizationHelper localizedStringForKey:@"Applications"] forState:UIControlStateNormal];
|
||||||
@@ -542,6 +545,9 @@ static const float REFRESH_CYCLE = 2.0f;
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_iconBackgroundView.backgroundColor = [ThemeManager appPrimaryColorWithAlpha];
|
_iconBackgroundView.backgroundColor = [ThemeManager appPrimaryColorWithAlpha];
|
||||||
|
UIColor* iconColor = [[UIColor whiteColor] colorWithAlphaComponent:[self isDarkTheme] ? 0.63 : 1];
|
||||||
|
_hostIconView.tintColor = iconColor;
|
||||||
|
lockIconView.tintColor = iconColor;
|
||||||
lockIconView.hidden = NO;
|
lockIconView.hidden = NO;
|
||||||
_appButton.hidden = YES;
|
_appButton.hidden = YES;
|
||||||
_launchButton.hidden = YES;
|
_launchButton.hidden = YES;
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ static UIUserInterfaceStyle _userInterfaceStyle;
|
|||||||
break;
|
break;
|
||||||
case UIUserInterfaceStyleDark:
|
case UIUserInterfaceStyleDark:
|
||||||
default:
|
default:
|
||||||
return [[ThemeManager appPrimaryColor] colorWithAlphaComponent:0.5];
|
return [[ThemeManager appPrimaryColor] colorWithAlphaComponent:0.24];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user