1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-09-27 03:52:57 +02:00

added styles to homepage buttons

This commit is contained in:
Kyle Spearrin 2016-06-22 23:50:38 -04:00
parent 03d3c5921a
commit a437731bfa
2 changed files with 25 additions and 5 deletions

View File

@ -143,6 +143,7 @@ namespace Bit.App
var grayLight = Color.FromHex("777777");
var grayLighter = Color.FromHex("d2d6de");
var primaryColor = Color.FromHex("3c8dbc");
var primaryColorAccent = Color.FromHex("286090");
Resources = new ResourceDictionary();
@ -171,6 +172,23 @@ namespace Bit.App
}
});
Resources.Add("btn-primary", new Style(typeof(Button))
{
Setters = {
new Setter { Property = Button.TextColorProperty, Value = Color.White },
new Setter { Property = Button.BackgroundColorProperty, Value = primaryColor },
new Setter { Property = Button.FontAttributesProperty, Value = FontAttributes.Bold },
new Setter { Property = Button.BorderRadiusProperty, Value = 0 }
}
});
Resources.Add("btn-primaryAccent", new Style(typeof(Button))
{
Setters = {
new Setter { Property = Button.TextColorProperty, Value = primaryColorAccent }
}
});
Resources.Add(new Style(typeof(Button))
{
Setters = {

View File

@ -37,7 +37,7 @@ namespace Bit.App.Pages
var message = new Label
{
Text = "Welcome!",
VerticalOptions = LayoutOptions.CenterAndExpand,
VerticalOptions = LayoutOptions.StartAndExpand,
HorizontalOptions = LayoutOptions.Center
};
@ -46,8 +46,9 @@ namespace Bit.App.Pages
Text = "Create Account",
//Command = new Command(async () => await LogoutAsync()),
VerticalOptions = LayoutOptions.End,
HorizontalOptions = LayoutOptions.CenterAndExpand,
Style = (Style)Application.Current.Resources["btn-default"]
HorizontalOptions = LayoutOptions.Fill,
Style = (Style)Application.Current.Resources["btn-primary"],
FontSize = 17
};
var loginButton = new Button
@ -55,8 +56,9 @@ namespace Bit.App.Pages
Text = AppResources.LogIn,
Command = new Command(async () => await LoginAsync()),
VerticalOptions = LayoutOptions.End,
HorizontalOptions = LayoutOptions.CenterAndExpand,
Style = (Style)Application.Current.Resources["btn-default"]
Style = (Style)Application.Current.Resources["btn-primaryAccent"],
HorizontalOptions = LayoutOptions.Fill,
FontSize = 17
};
var buttonStackLayout = new StackLayout