From 0095c41ee476500f58764daf386c8edefa8524a2 Mon Sep 17 00:00:00 2001 From: JanNiklas Grabowski Date: Tue, 22 Aug 2023 08:35:28 +0000 Subject: [PATCH] MESSENGER-4966 color changes login flow and all chat --- Riot/Managers/Theme/ThemeService.m | 6 +++++ Riot/Modules/Application/AppDelegate.swift | 4 ++- .../Common/Buttons/RoundedButton.swift | 16 ++++++++--- .../AllChats/AllChatsViewController.swift | 4 +++ ...ficationSelfVerifyWaitViewController.swift | 2 ++ .../Settings/RoomSettingsViewController.m | 3 +++ ...RecoveryWithPassphraseViewController.swift | 2 ++ .../SetupBiometricsViewController.swift | 11 ++++++-- .../Security/SecurityViewController.m | 2 ++ .../Modules/Settings/SettingsViewController.m | 27 +++++++++++++++++++ bwi/FeatureBanner/FeatureBannerView.swift | 12 ++++----- 11 files changed, 76 insertions(+), 13 deletions(-) diff --git a/Riot/Managers/Theme/ThemeService.m b/Riot/Managers/Theme/ThemeService.m index a47892fb4..f031de342 100644 --- a/Riot/Managers/Theme/ThemeService.m +++ b/Riot/Managers/Theme/ThemeService.m @@ -160,6 +160,12 @@ NSString *const kThemeServiceDidChangeThemeNotification = @"kThemeServiceDidChan [[UIStackView appearanceWhenContainedInInstancesOfClasses:@[[UINavigationBar class]]] setSpacing:-7]; [[UIStackView appearanceWhenContainedInInstancesOfClasses:@[[UINavigationBar class]]] setDistribution:UIStackViewDistributionEqualCentering]; + + [[UIView appearanceWhenContainedInInstancesOfClasses:@[[UIAlertController class]]] setTintColor: self.theme.tintColor]; + + // bwi + UISwitch.appearance.thumbTintColor = self.theme.backgroundColor; + UISwitch.appearance.onTintColor = self.theme.tintColor; } @end diff --git a/Riot/Modules/Application/AppDelegate.swift b/Riot/Modules/Application/AppDelegate.swift index 3dcbfbf24..ae85a22ab 100644 --- a/Riot/Modules/Application/AppDelegate.swift +++ b/Riot/Modules/Application/AppDelegate.swift @@ -75,7 +75,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate { // bwi: set the tint color for the alert buttons and tableview cells UIView.appearance(whenContainedInInstancesOf: [UIAlertController.self]).tintColor = ThemeService.shared().theme.tintColor UITableViewCell.appearance().tintColor = ThemeService.shared().theme.tintColor - + UISwitch.appearance().thumbTintColor = ThemeService.shared().theme.backgroundColor + UISwitch.appearance().onTintColor = ThemeService.shared().theme.tintColor + return true } diff --git a/Riot/Modules/Common/Buttons/RoundedButton.swift b/Riot/Modules/Common/Buttons/RoundedButton.swift index 59ab48d44..5ed4ceb1a 100644 --- a/Riot/Modules/Common/Buttons/RoundedButton.swift +++ b/Riot/Modules/Common/Buttons/RoundedButton.swift @@ -22,6 +22,7 @@ final class RoundedButton: CustomRoundedButton, Themable { private enum Constants { static let backgroundColorAlpha: CGFloat = 1.0 + static let buttonDisabledAlpha: CGFloat = 0.2 // BWI: #4966 } // MARK: - Properties @@ -62,11 +63,18 @@ final class RoundedButton: CustomRoundedButton, Themable { backgroundColor = theme.noticeColor } - self.vc_setBackgroundColor(backgroundColor.withAlphaComponent(Constants.backgroundColorAlpha), for: .normal) - self.setTitleColor(.white, for: .normal) - self.setTitleColor(.white, for: .disabled) + // BWI: #4966 + self.backgroundColor = theme.tintColor + if BWIBuildSettings.shared.useNewBumColors { + self.tintColor = theme.backgroundColor + self.setTitleColor(theme.backgroundColor, for: .normal) + self.setTitleColor(theme.backgroundColor.withAlphaComponent(Constants.buttonDisabledAlpha), for: .disabled) + } else { + self.vc_setBackgroundColor(backgroundColor.withAlphaComponent(Constants.backgroundColorAlpha), for: .normal) + self.setTitleColor(.white, for: .normal) + self.setTitleColor(.white, for: .disabled) + } } - // MARK: - Themable func update(theme: Theme) { diff --git a/Riot/Modules/Home/AllChats/AllChatsViewController.swift b/Riot/Modules/Home/AllChats/AllChatsViewController.swift index 005b43dec..269b46aa5 100644 --- a/Riot/Modules/Home/AllChats/AllChatsViewController.swift +++ b/Riot/Modules/Home/AllChats/AllChatsViewController.swift @@ -570,6 +570,10 @@ class AllChatsViewController: HomeViewController { if BWIBuildSettings.shared.useNewBumColors { toolbar.tintColor = ThemeService.shared().theme.tintColor toolbar.barTintColor = ThemeService.shared().theme.backgroundColor + // BWI: #4966 + for barButtonItem in toolbar.items ?? [UIBarButtonItem]() { + barButtonItem.tintColor = ThemeService.shared().theme.tintColor + } UIToolbar.appearance().tintColor = ThemeService.shared().theme.tintColor UIToolbar.appearance().barTintColor = ThemeService.shared().theme.backgroundColor diff --git a/Riot/Modules/KeyVerification/Device/SelfVerifyWait/KeyVerificationSelfVerifyWaitViewController.swift b/Riot/Modules/KeyVerification/Device/SelfVerifyWait/KeyVerificationSelfVerifyWaitViewController.swift index b68a8ef89..7636c3c2e 100644 --- a/Riot/Modules/KeyVerification/Device/SelfVerifyWait/KeyVerificationSelfVerifyWaitViewController.swift +++ b/Riot/Modules/KeyVerification/Device/SelfVerifyWait/KeyVerificationSelfVerifyWaitViewController.swift @@ -101,6 +101,8 @@ final class KeyVerificationSelfVerifyWaitViewController: UIViewController { self.mobileClientImageView.tintColor = theme.tintColor self.recoverSecretsAvailabilityLoadingLabel.textColor = theme.textSecondaryColor self.recoverSecretsAvailabilityActivityIndicatorView.color = theme.tintColor + // BWI: #4966 + self.recoverSecretsButton.update(theme: theme) } private func registerThemeServiceDidChangeThemeNotification() { diff --git a/Riot/Modules/Room/Settings/RoomSettingsViewController.m b/Riot/Modules/Room/Settings/RoomSettingsViewController.m index e096ee2e9..5a8d9c5c8 100644 --- a/Riot/Modules/Room/Settings/RoomSettingsViewController.m +++ b/Riot/Modules/Room/Settings/RoomSettingsViewController.m @@ -2803,6 +2803,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti MXKTableViewCellWithLabelAndSwitch *roomBlacklistUnverifiedDevicesCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath]; [roomBlacklistUnverifiedDevicesCell.mxkSwitch addTarget:self action:@selector(toggleBlacklistUnverifiedDevice:) forControlEvents:UIControlEventValueChanged]; + roomBlacklistUnverifiedDevicesCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; roomBlacklistUnverifiedDevicesCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; roomBlacklistUnverifiedDevicesCell.mxkLabel.text = [VectorL10n roomDetailsAdvancedE2eEncryptionBlacklistUnverifiedDevices]; @@ -2916,6 +2917,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti cell.mxkLabel.textColor = ThemeService.shared.theme.textPrimaryColor; + cell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; cell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; [cell.mxkSwitch removeTarget:self action:nil forControlEvents:UIControlEventValueChanged]; @@ -3783,6 +3785,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti [toggleCell.mxkSwitch addTarget:self action:@selector(toggleNotificationTimes:) forControlEvents:UIControlEventValueChanged]; toggleCell.mxkLabel.text = BWIL10n.settingsEnableNotificationTimes; + toggleCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; toggleCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; toggleCell.mxkSwitch.on = [self isNotificationTimesSwitchOn]; toggleCell.mxkSwitch.enabled = [self isNotificationTimesSwitchEnabled]; diff --git a/Riot/Modules/Secrets/Recover/RecoverWithPassphrase/SecretsRecoveryWithPassphraseViewController.swift b/Riot/Modules/Secrets/Recover/RecoverWithPassphrase/SecretsRecoveryWithPassphraseViewController.swift index 39bd01c6f..581044528 100644 --- a/Riot/Modules/Secrets/Recover/RecoverWithPassphrase/SecretsRecoveryWithPassphraseViewController.swift +++ b/Riot/Modules/Secrets/Recover/RecoverWithPassphrase/SecretsRecoveryWithPassphraseViewController.swift @@ -194,6 +194,8 @@ final class SecretsRecoveryWithPassphraseViewController: UIViewController { @objc private func themeDidChange() { self.update(theme: ThemeService.shared().theme) + // BWI: #4966 + self.recoverButton.update(theme: theme) } private func updateRecoverButton() { diff --git a/Riot/Modules/SetPinCode/SetupBiometrics/SetupBiometricsViewController.swift b/Riot/Modules/SetPinCode/SetupBiometrics/SetupBiometricsViewController.swift index 72b20b09d..f4d0bcb2c 100644 --- a/Riot/Modules/SetPinCode/SetupBiometrics/SetupBiometricsViewController.swift +++ b/Riot/Modules/SetPinCode/SetupBiometrics/SetupBiometricsViewController.swift @@ -97,8 +97,15 @@ final class SetupBiometricsViewController: UIViewController { self.subtitleLabel.textColor = theme.textSecondaryColor self.enableButton.backgroundColor = theme.tintColor - self.enableButton.tintColor = theme.baseTextPrimaryColor - self.enableButton.setTitleColor(theme.baseTextPrimaryColor, for: .normal) + // BWI: #4966 + + if BWIBuildSettings.shared.useNewBumColors { + self.enableButton.tintColor = theme.backgroundColor + self.enableButton.setTitleColor(theme.backgroundColor, for: .normal) + } else { + self.enableButton.tintColor = theme.baseTextPrimaryColor + self.enableButton.setTitleColor(theme.baseTextPrimaryColor, for: .normal) + } } private func registerThemeServiceDidChangeThemeNotification() { diff --git a/Riot/Modules/Settings/Security/SecurityViewController.m b/Riot/Modules/Settings/Security/SecurityViewController.m index 0e39ab39d..0a7d1e520 100644 --- a/Riot/Modules/Settings/Security/SecurityViewController.m +++ b/Riot/Modules/Settings/Security/SecurityViewController.m @@ -1309,6 +1309,8 @@ TableViewSectionsDelegate> labelAndSwitchCell.mxkLabel.text = BWIL10n.bwiSettingsAnalyticsSwitchText; labelAndSwitchCell.mxkSwitch.on = BWIAnalytics.sharedTracker.running; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = YES; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(bwiToggleEnableMatomoTracking:) forControlEvents:UIControlEventTouchUpInside]; diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index 1441c3c12..57dca6737 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -1648,6 +1648,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsEnableRoomMessageBubbles]; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.roomScreenEnableMessageBubbles; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = YES; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableRoomMessageBubbles:) forControlEvents:UIControlEventTouchUpInside]; @@ -1663,6 +1664,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsLabsEnableAutoReportDecryptionErrors]; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.enableUISIAutoReporting; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = YES; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableAutoReportDecryptionErrors:) forControlEvents:UIControlEventTouchUpInside]; @@ -1678,6 +1680,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsLabsEnableLiveLocationSharing]; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.enableLiveLocationSharing; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = YES; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableLiveLocationSharing:) forControlEvents:UIControlEventTouchUpInside]; @@ -2231,6 +2234,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = VectorL10n.locationSharingSettingsToggleTitle; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.roomScreenAllowLocationAction; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = YES; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleLocationSharing:) forControlEvents:UIControlEventTouchUpInside]; @@ -2246,6 +2250,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsConfirmMediaSize]; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.showMediaCompressionPrompt; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = YES; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleConfirmMediaSize:) forControlEvents:UIControlEventTouchUpInside]; @@ -2261,6 +2266,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsShowUrlPreviews]; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.roomScreenShowsURLPreviews; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = YES; @@ -2285,6 +2291,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath]; labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsEnablePushNotif]; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = YES; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(togglePushNotifications:) forControlEvents:UIControlEventTouchUpInside]; @@ -2323,6 +2330,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = VectorL10n.settingsEnableInappNotifications; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.showInAppNotifications; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = account.pushNotificationServiceIsActive; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleShowInAppNotifications:) forControlEvents:UIControlEventTouchUpInside]; @@ -2335,6 +2343,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsShowDecryptedContent]; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.showDecryptedContentInNotifications; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = account.pushNotificationServiceIsActive; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleShowDecodedContent:) forControlEvents:UIControlEventTouchUpInside]; @@ -2348,6 +2357,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsPinRoomsWithMissedNotif]; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.pinRoomsWithMissedNotificationsOnHome; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = YES; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(togglePinRoomsWithMissedNotif:) forControlEvents:UIControlEventTouchUpInside]; @@ -2360,6 +2370,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsPinRoomsWithUnread]; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.pinRoomsWithUnreadMessagesOnHome; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = YES; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(togglePinRoomsWithUnread:) forControlEvents:UIControlEventTouchUpInside]; @@ -2395,6 +2406,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath]; labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsCallsStunServerFallbackButton]; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.allowStunServerFallback; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = YES; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleStunServerFallback:) forControlEvents:UIControlEventTouchUpInside]; @@ -2441,6 +2453,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath]; labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsIntegrationsAllowButton]; labelAndSwitchCell.mxkSwitch.on = sharedSettings.hasIntegrationProvisioningEnabled; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = YES; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleAllowIntegrations:) forControlEvents:UIControlEventTouchUpInside]; @@ -2533,6 +2546,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = VectorL10n.settingsUiShowRedactionsInRoomHistory; labelAndSwitchCell.mxkSwitch.on = [MXKAppSettings standardAppSettings].showRedactionsInRoomHistory; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = YES; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleShowRedacted:) forControlEvents:UIControlEventTouchUpInside]; @@ -2546,6 +2560,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = VectorL10n.settingsLabsUseOnlyLatestUserAvatarAndName; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.roomScreenUseOnlyLatestUserAvatarAndName; labelAndSwitchCell.mxkSwitch.enabled = YES; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleUseOnlyLatestUserAvatarAndName:) forControlEvents:UIControlEventTouchUpInside]; @@ -2575,6 +2590,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.numberOfLines = 0; labelAndSwitchCell.mxkLabel.text = VectorL10n.settingsContactsEnableSync; labelAndSwitchCell.mxkSwitch.on = [MXKAppSettings standardAppSettings].syncLocalContacts; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = YES; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleLocalContactsSync:) forControlEvents:UIControlEventTouchUpInside]; @@ -2613,6 +2629,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> MXKAccount *account = MXKAccountManager.sharedManager.accounts.firstObject; labelAndSwitchCell.mxkSwitch.on = account.preferredSyncPresence == MXPresenceOffline; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = YES; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(togglePresenceOfflineMode:) forControlEvents:UIControlEventTouchUpInside]; @@ -2722,6 +2739,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsShowNSFWPublicRooms]; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.showNSFWPublicRooms; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = YES; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleNSFWPublicRoomsFiltering:) forControlEvents:UIControlEventTouchUpInside]; @@ -2734,6 +2752,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> sendCrashReportCell.mxkLabel.text = VectorL10n.settingsAnalyticsAndCrashData; sendCrashReportCell.mxkSwitch.on = RiotSettings.shared.enableAnalytics; + sendCrashReportCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; sendCrashReportCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; sendCrashReportCell.mxkSwitch.enabled = YES; [sendCrashReportCell.mxkSwitch addTarget:self action:@selector(toggleAnalytics:) forControlEvents:UIControlEventTouchUpInside]; @@ -2746,6 +2765,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> enableRageShakeCell.mxkLabel.text = [VectorL10n settingsEnableRageshake]; enableRageShakeCell.mxkSwitch.on = RiotSettings.shared.enableRageShake; + enableRageShakeCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; enableRageShakeCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; enableRageShakeCell.mxkSwitch.enabled = YES; [enableRageShakeCell.mxkSwitch addTarget:self action:@selector(toggleEnableRageShake:) forControlEvents:UIControlEventTouchUpInside]; @@ -2896,6 +2916,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> MXKTableViewCellWithLabelAndSwitch *labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath]; labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsLabsEnableRingingForGroupCalls]; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.enableRingingForGroupCalls; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; @@ -2909,6 +2930,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsLabsEnableThreads]; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.enableThreads; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableThreads:) forControlEvents:UIControlEventTouchUpInside]; @@ -2929,6 +2951,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsLabsEnableNewSessionManager]; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.enableNewSessionManager; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableNewSessionManager:) forControlEvents:UIControlEventTouchUpInside]; @@ -2941,6 +2964,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsLabsEnableNewClientInfoFeature]; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.enableClientInformationFeature; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableNewClientInfoFeature:) forControlEvents:UIControlEventTouchUpInside]; @@ -2953,6 +2977,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsLabsEnableWysiwygComposer]; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.enableWysiwygComposer; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableWysiwygComposerFeature:) forControlEvents:UIControlEventTouchUpInside]; @@ -2966,6 +2991,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsLabsEnableVoiceBroadcast]; labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.enableVoiceBroadcast; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableVoiceBroadcastFeature:) forControlEvents:UIControlEventTouchUpInside]; @@ -5131,6 +5157,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkLabel.text = [self titleForTimeline:row]; labelAndSwitchCell.mxkSwitch.on = [self enabledForTimeLine:row]; + labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = YES; [labelAndSwitchCell.mxkSwitch addTarget:self action:[self actionForTimeLine:row] forControlEvents:UIControlEventTouchUpInside]; diff --git a/bwi/FeatureBanner/FeatureBannerView.swift b/bwi/FeatureBanner/FeatureBannerView.swift index 10e07818d..0e26a44dd 100644 --- a/bwi/FeatureBanner/FeatureBannerView.swift +++ b/bwi/FeatureBanner/FeatureBannerView.swift @@ -125,10 +125,10 @@ struct FeatureBannerView: View { HStack() { Image(Asset.Images.newFeatures.name) .renderingMode(.template) - .foregroundColor(.white) + .foregroundColor(Color(ThemeService.shared().theme.backgroundColor)) Text(BWIL10n.bwiFeatureBannerHeader) .font(.system(size: 20).bold()) - .foregroundColor(.white) + .foregroundColor(Color(ThemeService.shared().theme.backgroundColor)) } } @@ -137,7 +137,7 @@ struct FeatureBannerView: View { .font(.system(size: 15)) .multilineTextAlignment(.center) .lineLimit(nil) - .foregroundColor(.white) + .foregroundColor(Color(ThemeService.shared().theme.backgroundColor)) .padding(5) } @@ -149,7 +149,7 @@ struct FeatureBannerView: View { } label: { Image(Asset.Images.closeButton.name) .renderingMode(.template) - .foregroundColor(.white) + .foregroundColor(Color(ThemeService.shared().theme.backgroundColor)) .padding(10) } } @@ -162,9 +162,9 @@ struct FeatureBannerView: View { Text(BWIL10n.bwiFeatureBannerShowMoreButton) .font(.system(size: 15)) .padding(10) - .foregroundColor(.white) + .foregroundColor(Color(ThemeService.shared().theme.backgroundColor)) .overlay(RoundedRectangle(cornerRadius: 12) - .stroke(Color.white, lineWidth: 2)) + .stroke(Color(ThemeService.shared().theme.backgroundColor), lineWidth: 2)) } .padding(.top, 10) .padding(.bottom, 25)