mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-25 12:05:59 +01:00
PS-587 - Fix searchbar search textfield and icon colors for dark themes (#1941)
* PS-587 Fix searchbar search textfield and icon colors for dark themes * PS-587 - PR corrections
This commit is contained in:
parent
9b41db962e
commit
0a64e4c918
@ -33,10 +33,7 @@ namespace Bit.iOS.Autofill
|
|||||||
CancelBarButton.Title = AppResources.Cancel;
|
CancelBarButton.Title = AppResources.Cancel;
|
||||||
SearchBar.Placeholder = AppResources.Search;
|
SearchBar.Placeholder = AppResources.Search;
|
||||||
SearchBar.BackgroundColor = SearchBar.BarTintColor = ThemeHelpers.ListHeaderBackgroundColor;
|
SearchBar.BackgroundColor = SearchBar.BarTintColor = ThemeHelpers.ListHeaderBackgroundColor;
|
||||||
if (!ThemeHelpers.LightTheme)
|
SearchBar.UpdateThemeIfNeeded();
|
||||||
{
|
|
||||||
SearchBar.KeyboardAppearance = UIKeyboardAppearance.Dark;
|
|
||||||
}
|
|
||||||
|
|
||||||
TableView.RowHeight = UITableView.AutomaticDimension;
|
TableView.RowHeight = UITableView.AutomaticDimension;
|
||||||
TableView.EstimatedRowHeight = 44;
|
TableView.EstimatedRowHeight = 44;
|
||||||
|
20
src/iOS.Core/Utilities/UISearchBarExtensions.cs
Normal file
20
src/iOS.Core/Utilities/UISearchBarExtensions.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
using UIKit;
|
||||||
|
|
||||||
|
namespace Bit.iOS.Core.Utilities
|
||||||
|
{
|
||||||
|
public static class UISearchBarExtensions
|
||||||
|
{
|
||||||
|
public static void UpdateThemeIfNeeded(this UISearchBar searchBar)
|
||||||
|
{
|
||||||
|
if (!ThemeHelpers.LightTheme)
|
||||||
|
{
|
||||||
|
searchBar.KeyboardAppearance = UIKeyboardAppearance.Dark;
|
||||||
|
if (UIDevice.CurrentDevice.CheckSystemVersion(13, 0))
|
||||||
|
{
|
||||||
|
searchBar.SearchTextField.TextColor = UIColor.White;
|
||||||
|
searchBar.SearchTextField.LeftView.TintColor = UIColor.White;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -194,6 +194,7 @@
|
|||||||
<Compile Include="Services\ClipboardService.cs" />
|
<Compile Include="Services\ClipboardService.cs" />
|
||||||
<Compile Include="Utilities\FontElementExtensions.cs" />
|
<Compile Include="Utilities\FontElementExtensions.cs" />
|
||||||
<Compile Include="Effects\ScrollViewContentInsetAdjustmentBehaviorEffect.cs" />
|
<Compile Include="Effects\ScrollViewContentInsetAdjustmentBehaviorEffect.cs" />
|
||||||
|
<Compile Include="Utilities\UISearchBarExtensions.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\App\App.csproj">
|
<ProjectReference Include="..\App\App.csproj">
|
||||||
|
Loading…
Reference in New Issue
Block a user