From a437731bfa5fc227b8936bd1001b3309c0c4d7c6 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 22 Jun 2016 23:50:38 -0400 Subject: [PATCH] added styles to homepage buttons --- src/App/App.cs | 18 ++++++++++++++++++ src/App/Pages/HomePage.cs | 12 +++++++----- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/App/App.cs b/src/App/App.cs index 60412212d..82766705a 100644 --- a/src/App/App.cs +++ b/src/App/App.cs @@ -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 = { diff --git a/src/App/Pages/HomePage.cs b/src/App/Pages/HomePage.cs index 8c766e21e..d030d68fd 100644 --- a/src/App/Pages/HomePage.cs +++ b/src/App/Pages/HomePage.cs @@ -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