From 3e183254c77bd34a9c362364947124e732a941d1 Mon Sep 17 00:00:00 2001 From: Gil Eluard Date: Wed, 3 Aug 2022 09:48:05 +0200 Subject: [PATCH] Implement the new Space selector bottom sheet #6410 - Reverted some Theme tweaks to fix some UI regressions --- Riot/Managers/Theme/Themes/DarkTheme.swift | 12 ++++++++++-- Riot/Managers/Theme/Themes/DefaultTheme.swift | 10 +++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Riot/Managers/Theme/Themes/DarkTheme.swift b/Riot/Managers/Theme/Themes/DarkTheme.swift index fbf265729f..fb4a2a3d7d 100644 --- a/Riot/Managers/Theme/Themes/DarkTheme.swift +++ b/Riot/Managers/Theme/Themes/DarkTheme.swift @@ -146,8 +146,16 @@ class DarkTheme: NSObject, Theme { navigationBar.standardAppearance = appearance - navigationBar.scrollEdgeAppearance = modernScrollEdgeAppearance || BuildSettings.newAppLayoutEnabled ? nil : appearance - } else { + if BuildSettings.newAppLayoutEnabled { + appearance.configureWithOpaqueBackground() + appearance.backgroundColor = baseColor + appearance.shadowColor = nil + appearance.titleTextAttributes = [ + NSAttributedString.Key.foregroundColor: textPrimaryColor + ] + } + navigationBar.scrollEdgeAppearance = modernScrollEdgeAppearance ? nil : appearance + } else { navigationBar.titleTextAttributes = [ NSAttributedString.Key.foregroundColor: textPrimaryColor ] diff --git a/Riot/Managers/Theme/Themes/DefaultTheme.swift b/Riot/Managers/Theme/Themes/DefaultTheme.swift index 289aabf0fd..d1207330ac 100644 --- a/Riot/Managers/Theme/Themes/DefaultTheme.swift +++ b/Riot/Managers/Theme/Themes/DefaultTheme.swift @@ -149,7 +149,15 @@ class DefaultTheme: NSObject, Theme { ] navigationBar.standardAppearance = appearance - navigationBar.scrollEdgeAppearance = modernScrollEdgeAppearance || BuildSettings.newAppLayoutEnabled ? nil : appearance + if BuildSettings.newAppLayoutEnabled { + appearance.configureWithOpaqueBackground() + appearance.backgroundColor = baseColor + appearance.shadowColor = nil + appearance.titleTextAttributes = [ + NSAttributedString.Key.foregroundColor: textPrimaryColor + ] + } + navigationBar.scrollEdgeAppearance = modernScrollEdgeAppearance ? nil : appearance } else { navigationBar.titleTextAttributes = [ NSAttributedString.Key.foregroundColor: textPrimaryColor