From a363712127c35a0c6e29ad34104737e60c5b3082 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 4 Oct 2019 09:32:59 -0400 Subject: [PATCH] use black text for search bar on light theme --- src/App/Controls/ExtendedSearchBar.cs | 21 ++++++++++++++++++++ src/App/Pages/Vault/CiphersPage.xaml | 2 +- src/App/Styles/Android.xaml | 3 ++- src/App/Styles/iOS.xaml | 3 ++- src/iOS.Core/Services/DeviceActionService.cs | 10 +++++++++- 5 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 src/App/Controls/ExtendedSearchBar.cs diff --git a/src/App/Controls/ExtendedSearchBar.cs b/src/App/Controls/ExtendedSearchBar.cs new file mode 100644 index 000000000..c93861d94 --- /dev/null +++ b/src/App/Controls/ExtendedSearchBar.cs @@ -0,0 +1,21 @@ +using Bit.App.Abstractions; +using Bit.Core.Utilities; +using Xamarin.Forms; + +namespace Bit.App.Controls +{ + public class ExtendedSearchBar : SearchBar + { + public ExtendedSearchBar() + { + if(Device.RuntimePlatform == Device.iOS) + { + var deviceActionService = ServiceContainer.Resolve("deviceActionService", true); + if(!deviceActionService?.UsingDarkTheme() ?? false) + { + TextColor = Color.Black; + } + } + } + } +} diff --git a/src/App/Pages/Vault/CiphersPage.xaml b/src/App/Pages/Vault/CiphersPage.xaml index b7e52d633..81b63b2a9 100644 --- a/src/App/Pages/Vault/CiphersPage.xaml +++ b/src/App/Pages/Vault/CiphersPage.xaml @@ -34,7 +34,7 @@ VerticalOptions="CenterAndExpand" Clicked="BackButton_Clicked" x:Name="_backButton" /> - - -