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 grayLight = Color.FromHex("777777");
var grayLighter = Color.FromHex("d2d6de"); var grayLighter = Color.FromHex("d2d6de");
var primaryColor = Color.FromHex("3c8dbc"); var primaryColor = Color.FromHex("3c8dbc");
var primaryColorAccent = Color.FromHex("286090");
Resources = new ResourceDictionary(); 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)) Resources.Add(new Style(typeof(Button))
{ {
Setters = { Setters = {

View file

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