From 741ced481cb268522217c2db3a2fc2bf12b044b3 Mon Sep 17 00:00:00 2001 From: Joseph Mattiello Date: Fri, 15 Nov 2024 00:34:50 -0500 Subject: [PATCH] search bar theming close enough Signed-off-by: Joseph Mattiello update todods Signed-off-by: Joseph Mattiello --- PVThemes/Sources/PVThemes/ThemeApplier.swift | 19 +++++++++++++ TODO.md | 29 ++------------------ 2 files changed, 21 insertions(+), 27 deletions(-) diff --git a/PVThemes/Sources/PVThemes/ThemeApplier.swift b/PVThemes/Sources/PVThemes/ThemeApplier.swift index 84e3cb9feb..8a847b5f19 100644 --- a/PVThemes/Sources/PVThemes/ThemeApplier.swift +++ b/PVThemes/Sources/PVThemes/ThemeApplier.swift @@ -65,6 +65,7 @@ public extension ThemeManager { configureTabBar(palette) configureTableViews(palette) configureTextInputs(palette) + configureUISearchBar(palette) configureUIView(palette) configureUIWindow(palette) @@ -182,8 +183,26 @@ public extension ThemeManager { private class func configureTextInputs(_ palette: any UXThemePalette) { UITextField.appearance().keyboardAppearance = palette.keyboardAppearance UISearchBar.appearance().keyboardAppearance = palette.keyboardAppearance + + UITextField.appearance().backgroundColor = palette.gameLibraryBackground + UITextField.appearance().textColor = palette.gameLibraryText + DLOG("Text inputs - keyboardAppearance: \(palette.keyboardAppearance)") } + + @MainActor + private class func configureUISearchBar(_ palette: any UXThemePalette) { + UISearchBar.appearance().backgroundColor = palette.menuBackground + UISearchBar.appearance().tintColor = palette.menuText + UISearchBar.appearance().barTintColor = palette.menuBackground + UISearchBar.appearance().searchTextField.textColor = palette.menuText + UISearchTextField.appearance().tokenBackgroundColor = palette.menuHeaderBackground + UISearchTextField.appearance().tintColor = palette.menuIconTint + UISearchTextField.appearance().textColor = palette.menuText + + DLOG("UISearchBar - backgroundColor: \(palette.settingsCellBackground?.debugDescription ?? "nil"), tintColor: \(palette.gameLibraryText.debugDescription)") + } + @MainActor private class func configureActionSheets(_ palette: any UXThemePalette) { diff --git a/TODO.md b/TODO.md index 1193cdb65e..6da7f987dd 100644 --- a/TODO.md +++ b/TODO.md @@ -3,33 +3,7 @@ _My personal TODO notes_ ## Show stoppers -- [X] RetroArch GLES cores are crashing? -- [X] moveable button joystick and dpad move at the same time -- [X] Delete isn't deleting - - [X] throw an error on file manager error -- [X] audio is fucked -- [X] 4X multisampling crashes Mupen on iPad, (iphone?) -- [X] Refresh library and conflicts on new UI not working -- [X] UI is unresponsive after closing emulator -- [X] wrap advanced settings in freemiumview -- [X] fix launching webserver from swiftui menu -- [X] iCloud sync isn't working, remove or fix -- [X] Swift UI long press on roms menu missing actions {rename, ~~share~~} -- [X] Progress hud on unzips isn't hiding -- [X] Themes setting doesn't work -- [X] Conflicts folder is weird -- [X] SwiftUI not seeing conflicts -- [X] Copy the framework loader from old branch, fix it too! -- [X] emuThreeDS and other metal based cores have wrong layout contraints -- [X] Possible race condition in importer -- [X] Gambatte swift module not done -- [X] PVmGBA swift module is not done -- [X] Fix Repo submodules -- [X] Audio broken -- [X] Loading save states crashes realm -- [X] Creating save states crashes realm -- [X] SwiftUI not importing roms correctly -- [X] compiling with Mupen+Rumble.swift breaks device release builds +- [ ] Shared documents : return FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: PVAppGroupId) ## Major bugs @@ -90,6 +64,7 @@ _My personal TODO notes_ - [ ] Game text not themed - [ ] New import indicator not themed - [ ] Make GameMoreInfoVC and it's equivlant PageViewController into native swifttUI with editing of properties +- [ ] App Group containers in Catalyst "public class var appGroupContainer" ## Cores to translate