basic logic
This commit is contained in:
@ -9,7 +9,9 @@ public abstract class BaseTheme : ResourceDictionary
|
||||
public const string CascadiaFontBold = nameof(CascadiaFontBold);
|
||||
public const string RobotoCondensedFontRegular = nameof(RobotoCondensedFontRegular);
|
||||
public const string RobotoCondensedFontBold = nameof(RobotoCondensedFontBold);
|
||||
|
||||
public const string WindowBackgroundColor = nameof(WindowBackgroundColor);
|
||||
public const string OptionTintColor = nameof(OptionTintColor);
|
||||
public const string PromptBackgroundColor = nameof(PromptBackgroundColor);
|
||||
public const string PrimaryColor = nameof(PrimaryColor);
|
||||
public const string SecondaryColor = nameof(SecondaryColor);
|
||||
@ -18,7 +20,8 @@ public abstract class BaseTheme : ResourceDictionary
|
||||
public const string TabBarUnselectedColor = nameof(TabBarUnselectedColor);
|
||||
public const string OutRangeDayColor = nameof(OutRangeDayColor);
|
||||
public const string TextColor = nameof(TextColor);
|
||||
public const string WeekendColor = nameof(WeekendColor);
|
||||
public const string SecondaryTextColor = nameof(SecondaryTextColor);
|
||||
public const string RedColor = nameof(RedColor);
|
||||
|
||||
protected abstract Color PrimaryMauiColor { get; }
|
||||
protected abstract Color SecondaryMauiColor { get; }
|
||||
@ -44,6 +47,14 @@ public abstract class BaseTheme : ResourceDictionary
|
||||
new Setter { Property = Label.FontFamilyProperty, Value = robotoRegularFontFamily }
|
||||
}
|
||||
});
|
||||
Add(new Style(typeof(OptionEntry))
|
||||
{
|
||||
Setters =
|
||||
{
|
||||
new Setter { Property = Entry.FontSizeProperty, Value = Device.GetNamedSize(NamedSize.Small, typeof(Entry)) },
|
||||
new Setter { Property = Entry.FontFamilyProperty, Value = robotoRegularFontFamily }
|
||||
}
|
||||
});
|
||||
Add(new Style(typeof(Button))
|
||||
{
|
||||
Setters =
|
||||
|
@ -1,4 +1,5 @@
|
||||
using Xamarin.Forms;
|
||||
using Billing.UI;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Billing.Themes;
|
||||
|
||||
@ -20,12 +21,14 @@ public class Dark : BaseTheme
|
||||
private void InitColors()
|
||||
{
|
||||
Add(WindowBackgroundColor, Color.Black);
|
||||
Add(OptionTintColor, Color.FromRgb(28, 28, 28));
|
||||
Add(PromptBackgroundColor, Color.FromRgb(0x1f, 0x1f, 0x1f));
|
||||
Add(TabBarBackgroundColor, Color.Black);
|
||||
Add(TabBarUnselectedColor, Color.FromRgb(0x82, 0x82, 0x82));
|
||||
Add(OutRangeDayColor, Color.DarkGray);
|
||||
Add(TextColor, Color.FromRgb(0xcc, 0xcc, 0xcc));
|
||||
Add(WeekendColor, Color.FromRgb(211, 5, 5));
|
||||
Add(SecondaryTextColor, Color.LightGray);
|
||||
Add(RedColor, Color.FromRgb(211, 5, 5));
|
||||
|
||||
Add(new Style(typeof(TabBar))
|
||||
{
|
||||
@ -36,5 +39,12 @@ public class Dark : BaseTheme
|
||||
new Setter { Property = Shell.TabBarUnselectedColorProperty, Value = Color.FromRgb(0x82, 0x82, 0x82) }
|
||||
}
|
||||
});
|
||||
Add(new Style(typeof(TableView))
|
||||
{
|
||||
Setters =
|
||||
{
|
||||
new Setter { Property = VisualElement.BackgroundColorProperty, Value = Color.Black }
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
using Xamarin.Forms;
|
||||
using Billing.UI;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Billing.Themes;
|
||||
|
||||
@ -20,12 +21,14 @@ public class Light : BaseTheme
|
||||
private void InitColors()
|
||||
{
|
||||
Add(WindowBackgroundColor, Color.White);
|
||||
Add(OptionTintColor, Color.White);
|
||||
Add(PromptBackgroundColor, Color.FromRgb(0xe0, 0xe0, 0xe0));
|
||||
Add(TabBarBackgroundColor, Color.White);
|
||||
Add(TabBarUnselectedColor, Color.FromRgb(0x82, 0x82, 0x82));
|
||||
Add(OutRangeDayColor, Color.LightGray);
|
||||
Add(TextColor, Color.FromRgb(0x33, 0x33, 0x33));
|
||||
Add(WeekendColor, Color.FromRgb(211, 64, 85));
|
||||
Add(SecondaryTextColor, Color.DimGray);
|
||||
Add(RedColor, Color.FromRgb(211, 64, 85));
|
||||
|
||||
Add(new Style(typeof(TabBar))
|
||||
{
|
||||
@ -36,5 +39,12 @@ public class Light : BaseTheme
|
||||
new Setter { Property = Shell.TabBarUnselectedColorProperty, Value = Color.FromRgb(0x82, 0x82, 0x82) }
|
||||
}
|
||||
});
|
||||
Add(new Style(typeof(TableView))
|
||||
{
|
||||
Setters =
|
||||
{
|
||||
new Setter { Property = VisualElement.BackgroundColorProperty, Value = Color.FromRgb(242, 241, 245) }
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user