features:
- launcher logo - tab bar tint color - favorites logic udpated
This commit is contained in:
@@ -4,8 +4,6 @@ namespace Pixiview.UI.Theme
|
||||
{
|
||||
public class ThemeBase : ResourceDictionary
|
||||
{
|
||||
public const string TitleButton = nameof(TitleButton);
|
||||
public const string TitleLabel = nameof(TitleLabel);
|
||||
public const string FontIconUser = nameof(FontIconUser);
|
||||
public const string FontIconSparkles = nameof(FontIconSparkles);
|
||||
public const string FontIconOrder = nameof(FontIconOrder);
|
||||
@@ -18,11 +16,10 @@ namespace Pixiview.UI.Theme
|
||||
|
||||
public const string StatusBarStyle = nameof(StatusBarStyle);
|
||||
public const string WindowColor = nameof(WindowColor);
|
||||
public const string TintColor = nameof(TintColor);
|
||||
public const string TextColor = nameof(TextColor);
|
||||
public const string SubTextColor = nameof(SubTextColor);
|
||||
public const string MainColor = nameof(MainColor);
|
||||
public const string MainTextColor = nameof(MainTextColor);
|
||||
public const string SubColor = nameof(SubColor);
|
||||
public const string CardBackgroundColor = nameof(CardBackgroundColor);
|
||||
public const string MaskColor = nameof(MaskColor);
|
||||
public const string NavColor = nameof(NavColor);
|
||||
public const string NavSelectedColor = nameof(NavSelectedColor);
|
||||
@@ -58,43 +55,19 @@ namespace Pixiview.UI.Theme
|
||||
}
|
||||
}
|
||||
|
||||
var mainColor = (Color)this[MainTextColor];
|
||||
var tintColor = (Color)this[TextColor];
|
||||
var regularFontFamily = (string)this[IconRegularFontFamily];
|
||||
var solidFontFamily = (string)this[IconSolidFontFamily];
|
||||
|
||||
Add(TitleLabel, new Style(typeof(Label))
|
||||
{
|
||||
Setters =
|
||||
{
|
||||
new Setter { Property = View.VerticalOptionsProperty, Value = LayoutOptions.Center },
|
||||
new Setter { Property = View.HorizontalOptionsProperty, Value = LayoutOptions.Fill },
|
||||
new Setter { Property = Label.HorizontalTextAlignmentProperty, Value = TextAlignment.Center },
|
||||
new Setter { Property = Label.FontSizeProperty, Value = StyleDefinition.FontSizeTitle },
|
||||
new Setter { Property = Label.TextColorProperty, Value = mainColor }
|
||||
}
|
||||
});
|
||||
|
||||
Add(TitleButton, new Style(typeof(Button))
|
||||
{
|
||||
Setters =
|
||||
{
|
||||
new Setter { Property = Button.BorderWidthProperty, Value = 0.0 },
|
||||
new Setter { Property = VisualElement.BackgroundColorProperty, Value = Color.Transparent },
|
||||
new Setter { Property = Button.FontFamilyProperty, Value = solidFontFamily },
|
||||
new Setter { Property = Button.FontSizeProperty, Value = StyleDefinition.FontSizeTitleIcon },
|
||||
new Setter { Property = Button.TextColorProperty, Value = mainColor }
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Add(FontIconUser, GetSolidIcon(StyleDefinition.IconUser, solidFontFamily, mainColor));
|
||||
Add(FontIconSparkles, GetSolidIcon(StyleDefinition.IconSparkles, solidFontFamily, mainColor));
|
||||
Add(FontIconOrder, GetSolidIcon(StyleDefinition.IconOrder, solidFontFamily, mainColor));
|
||||
Add(FontIconRefresh, GetSolidIcon(StyleDefinition.IconRefresh, solidFontFamily, mainColor));
|
||||
Add(FontIconUser, GetSolidIcon(StyleDefinition.IconUser, solidFontFamily, tintColor));
|
||||
Add(FontIconSparkles, GetSolidIcon(StyleDefinition.IconSparkles, solidFontFamily, tintColor));
|
||||
Add(FontIconOrder, GetSolidIcon(StyleDefinition.IconOrder, solidFontFamily, tintColor));
|
||||
Add(FontIconRefresh, GetSolidIcon(StyleDefinition.IconRefresh, solidFontFamily, tintColor));
|
||||
Add(FontIconLove, GetSolidIcon(StyleDefinition.IconLove, solidFontFamily, StyleDefinition.ColorRedBackground));
|
||||
Add(FontIconNotLove, GetSolidIcon(StyleDefinition.IconLove, (string)this[IconRegularFontFamily], mainColor));
|
||||
Add(FontIconOption, GetSolidIcon(StyleDefinition.IconOption, solidFontFamily, mainColor));
|
||||
Add(FontIconDownload, GetSolidIcon(StyleDefinition.IconDownload, solidFontFamily, mainColor));
|
||||
Add(FontIconFavorite, GetSolidIcon(StyleDefinition.IconFavorite, solidFontFamily, mainColor));
|
||||
Add(FontIconNotLove, GetSolidIcon(StyleDefinition.IconLove, regularFontFamily, tintColor));
|
||||
Add(FontIconOption, GetSolidIcon(StyleDefinition.IconOption, solidFontFamily, tintColor));
|
||||
Add(FontIconDownload, GetSolidIcon(StyleDefinition.IconDownload, solidFontFamily, tintColor));
|
||||
Add(FontIconFavorite, GetSolidIcon(StyleDefinition.IconFavorite, solidFontFamily, tintColor));
|
||||
}
|
||||
|
||||
private FontImageSource GetSolidIcon(string icon, string family, Color color)
|
||||
|
||||
Reference in New Issue
Block a user