UI adjustment
This commit is contained in:
@@ -22,7 +22,7 @@ namespace Pixiview.UI.Theme
|
||||
public const string SubColor = nameof(SubColor);
|
||||
public const string MaskColor = nameof(MaskColor);
|
||||
public const string NavColor = nameof(NavColor);
|
||||
public const string SubNavColor = nameof(SubNavColor);
|
||||
public const string NavSelectedColor = nameof(NavSelectedColor);
|
||||
|
||||
public const string IconLightFontFamily = nameof(IconLightFontFamily);
|
||||
public const string IconRegularFontFamily = nameof(IconRegularFontFamily);
|
||||
@@ -55,7 +55,8 @@ namespace Pixiview.UI.Theme
|
||||
}
|
||||
}
|
||||
|
||||
var mainColor = this[MainTextColor];
|
||||
var mainColor = (Color)this[MainTextColor];
|
||||
var solidFontFamily = (string)this[IconSolidFontFamily];
|
||||
|
||||
Add(TitleLabel, new Style(typeof(Label))
|
||||
{
|
||||
@@ -75,28 +76,29 @@ namespace Pixiview.UI.Theme
|
||||
{
|
||||
new Setter { Property = Button.BorderWidthProperty, Value = 0.0 },
|
||||
new Setter { Property = VisualElement.BackgroundColorProperty, Value = Color.Transparent },
|
||||
new Setter { Property = Button.FontFamilyProperty, Value = (string)this[IconSolidFontFamily] },
|
||||
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));
|
||||
Add(FontIconSparkles, GetSolidIcon(StyleDefinition.IconSparkles));
|
||||
Add(FontIconOrder, GetSolidIcon(StyleDefinition.IconOrder));
|
||||
Add(FontIconRefresh, GetSolidIcon(StyleDefinition.IconRefresh));
|
||||
Add(FontIconOption, GetSolidIcon(StyleDefinition.IconOption));
|
||||
Add(FontIconDownload, GetSolidIcon(StyleDefinition.IconDownload));
|
||||
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(FontIconOption, GetSolidIcon(StyleDefinition.IconOption, solidFontFamily, mainColor));
|
||||
Add(FontIconDownload, GetSolidIcon(StyleDefinition.IconDownload, solidFontFamily, mainColor));
|
||||
}
|
||||
|
||||
private FontImageSource GetSolidIcon(string icon)
|
||||
private FontImageSource GetSolidIcon(string icon, string family, Color color)
|
||||
{
|
||||
return new FontImageSource
|
||||
{
|
||||
FontFamily = (string)this[IconSolidFontFamily],
|
||||
FontFamily = family,
|
||||
Glyph = icon,
|
||||
Size = StyleDefinition.FontSizeTitle
|
||||
Size = StyleDefinition.FontSizeTitle,
|
||||
Color = color
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user