Add labels to theme buttons

- Issue MatterHackers/MCCentral#4370
This commit is contained in:
John Lewin 2018-10-24 08:34:05 -07:00
parent 29af22e2ec
commit 30e6bdec26
6 changed files with 22 additions and 7 deletions

View file

@ -139,7 +139,10 @@ namespace MatterHackers.MatterControl.ConfigurationPage
themeset = provider.GetTheme(themeName);
}
previewContainer.AddChild(new ThemePreviewButton(themeset, this)
var previewColumn = new FlowLayoutWidget(FlowDirection.TopToBottom);
previewContainer.AddChild(previewColumn);
previewColumn.AddChild(new ThemePreviewButton(themeset, this)
{
HAnchor = HAnchor.Absolute,
VAnchor = VAnchor.Absolute,
@ -148,7 +151,19 @@ namespace MatterHackers.MatterControl.ConfigurationPage
Mode = themeName,
Border = 1,
BorderColor = theme.BorderColor20,
Margin = theme.DefaultContainerPadding
Margin = new BorderDouble(theme.DefaultContainerPadding, 0, theme.DefaultContainerPadding, theme.DefaultContainerPadding)
});
string name = themeset.Name;
if (string.IsNullOrEmpty(name))
{
name = themeset.ThemeID.Replace("-", " ");
}
previewColumn.AddChild(new TextWidget(name, pointSize: theme.FontSize7, textColor: theme.Colors.PrimaryTextColor)
{
HAnchor = HAnchor.Left,
Margin = new BorderDouble(12, 2)
});
if (themeName == AppContext.ThemeSet.ThemeID)

View file

@ -1,5 +1,5 @@
{
"ThemeName": "Classic Dark",
"Name": "Classic Dark",
"AccentColors": [
"#AC193D",
"#DC4FAD",

View file

@ -1,5 +1,5 @@
{
"ThemeName": "Classic Light",
"Name": "Classic Light",
"AccentColors": [
"#AC193D",
"#DC4FAD",

View file

@ -1,5 +1,5 @@
{
"ThemeName": "Modern Dark",
"Name": "Modern Dark",
"AccentColors": [
"#B58900",
"#CB4B16",

View file

@ -1,5 +1,5 @@
{
"ThemeName": "Solarized Dark",
"Name": "Solarized Dark",
"AccentColors": [
"#B58900",
"#CB4B16",

View file

@ -1,5 +1,5 @@
{
"ThemeName": "Solarized Light",
"Name": "Solarized Light",
"AccentColors": [
"#B58900",
"#CB4B16",