update app structure to Shell

This commit is contained in:
2020-05-06 18:16:47 +08:00
parent 8746d311d2
commit 010c93f8d5
18 changed files with 112 additions and 136 deletions

View File

@@ -6,6 +6,9 @@ namespace Pixiview.UI.Theme
{
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);
public const string FontIconRefresh = nameof(FontIconRefresh);
public const string FontIconOption = nameof(FontIconOption);
public const string FontIconDownload = nameof(FontIconDownload);
@@ -51,7 +54,6 @@ namespace Pixiview.UI.Theme
}
var mainColor = this[MainTextColor];
var iconSolidFontFamily = (string)this[IconSolidFontFamily];
Add(TitleLabel, new Style(typeof(Label))
{
@@ -71,30 +73,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 = iconSolidFontFamily },
new Setter { Property = Button.FontFamilyProperty, Value = (string)this[IconSolidFontFamily] },
new Setter { Property = Button.FontSizeProperty, Value = StyleDefinition.FontSizeTitleIcon },
new Setter { Property = Button.TextColorProperty, Value = mainColor }
}
});
Add(FontIconRefresh, new FontImageSource
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));
}
private FontImageSource GetSolidIcon(string icon)
{
return new FontImageSource
{
FontFamily = iconSolidFontFamily,
Glyph = StyleDefinition.IconRefresh,
FontFamily = (string)this[IconSolidFontFamily],
Glyph = icon,
Size = StyleDefinition.FontSizeTitle
});
Add(FontIconOption, new FontImageSource
{
FontFamily = iconSolidFontFamily,
Glyph = StyleDefinition.IconOption,
Size = StyleDefinition.FontSizeTitle
});
Add(FontIconDownload, new FontImageSource
{
FontFamily = iconSolidFontFamily,
Glyph = StyleDefinition.IconDownload,
Size = StyleDefinition.FontSizeTitle
});
};
}
}
}