theme updates to extensions

This commit is contained in:
Kyle Spearrin 2019-07-02 19:35:01 -04:00
parent 7953a9a3ce
commit a064a6cf9b
5 changed files with 20 additions and 2 deletions

View file

@ -58,6 +58,7 @@ namespace Bit.iOS.Autofill
{
searchLoginController.Context = Context;
searchLoginController.CPViewController = CPViewController;
searchLoginController.FromList = true;
}
}
}

View file

@ -18,6 +18,7 @@ namespace Bit.iOS.Autofill
public Context Context { get; set; }
public CredentialProviderViewController CPViewController { get; set; }
public bool FromList { get; set; }
public async override void ViewDidLoad()
{
@ -39,7 +40,14 @@ namespace Bit.iOS.Autofill
partial void CancelBarButton_Activated(UIBarButtonItem sender)
{
CPViewController.CompleteRequest();
if(FromList)
{
DismissViewController(true, null);
}
else
{
CPViewController.CompleteRequest();
}
}
partial void AddBarButton_Activated(UIBarButtonItem sender)

View file

@ -11,6 +11,7 @@ namespace Bit.iOS.Core.Views
if(headerView != null && headerView is UITableViewHeaderFooterView hv && hv.TextLabel != null)
{
hv.TextLabel.TextColor = ThemeHelpers.MutedColor;
hv.BackgroundColor = ThemeHelpers.ListHeaderBackgroundColor;
}
}
@ -19,6 +20,7 @@ namespace Bit.iOS.Core.Views
if(footerView != null && footerView is UITableViewHeaderFooterView fv && fv.TextLabel != null)
{
fv.TextLabel.TextColor = ThemeHelpers.MutedColor;
fv.BackgroundColor = ThemeHelpers.ListHeaderBackgroundColor;
}
}
}

View file

@ -14,6 +14,7 @@ namespace Bit.iOS.Core.Utilities
public static UIColor TextColor = Xamarin.Forms.Color.FromHex("#000000").ToUIColor();
public static UIColor PlaceholderColor = Xamarin.Forms.Color.FromHex("#d0d0d0").ToUIColor();
public static UIColor SeparatorColor = Xamarin.Forms.Color.FromHex("#dddddd").ToUIColor();
public static UIColor ListHeaderBackgroundColor = Xamarin.Forms.Color.FromHex("#efeff4").ToUIColor();
public static UIColor NavBarBackgroundColor = Xamarin.Forms.Color.FromHex("#3c8dbc").ToUIColor();
public static UIColor NavBarTextColor = Xamarin.Forms.Color.FromHex("#ffffff").ToUIColor();
@ -65,6 +66,7 @@ namespace Bit.iOS.Core.Utilities
TextColor = whiteColor;
PlaceholderColor = Xamarin.Forms.Color.FromHex("#707070").ToUIColor();
SeparatorColor = Xamarin.Forms.Color.FromHex("#191919").ToUIColor();
ListHeaderBackgroundColor = Xamarin.Forms.Color.FromHex("#222222").ToUIColor();
NavBarBackgroundColor = Xamarin.Forms.Color.FromHex("#212121").ToUIColor();
NavBarTextColor = whiteColor;
}
@ -80,6 +82,7 @@ namespace Bit.iOS.Core.Utilities
TextColor = whiteColor;
PlaceholderColor = Xamarin.Forms.Color.FromHex("#707070").ToUIColor();
SeparatorColor = Xamarin.Forms.Color.FromHex("#282828").ToUIColor();
ListHeaderBackgroundColor = blackColor;
NavBarBackgroundColor = blackColor;
NavBarTextColor = whiteColor;
}
@ -93,6 +96,7 @@ namespace Bit.iOS.Core.Utilities
TextColor = Xamarin.Forms.Color.FromHex("#e5e9f0").ToUIColor();
PlaceholderColor = Xamarin.Forms.Color.FromHex("#7b88a1").ToUIColor();
SeparatorColor = Xamarin.Forms.Color.FromHex("#2e3440").ToUIColor();
ListHeaderBackgroundColor = Xamarin.Forms.Color.FromHex("#2e3440").ToUIColor();
NavBarBackgroundColor = Xamarin.Forms.Color.FromHex("#2e3440").ToUIColor();
NavBarTextColor = Xamarin.Forms.Color.FromHex("#e5e9f0").ToUIColor();
}

View file

@ -12,7 +12,10 @@ namespace Bit.iOS.Core.Views
{
TextLabel.Text = labelName;
TextLabel.TextColor = ThemeHelpers.TextColor;
Switch.TintColor = ThemeHelpers.MutedColor;
if(!ThemeHelpers.LightTheme)
{
Switch.TintColor = ThemeHelpers.MutedColor;
}
Switch.OnTintColor = ThemeHelpers.PrimaryColor;
AccessoryView = Switch;