Rename theme.ActiveTabColor to theme.BackgroundColor
- Issue MatterHackers/MCCentral#4491
This commit is contained in:
parent
f4a92920f5
commit
7212f11871
35 changed files with 53 additions and 52 deletions
|
|
@ -74,7 +74,7 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
HAnchor = HAnchor.Absolute,
|
||||
VAnchor = VAnchor.Fit,
|
||||
Padding = new BorderDouble(12, 0),
|
||||
BackgroundColor = menuTheme.ActiveTabColor
|
||||
BackgroundColor = menuTheme.BackgroundColor
|
||||
};
|
||||
|
||||
var container = new FlowLayoutWidget(FlowDirection.TopToBottom)
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
HAnchor = HAnchor.Absolute,
|
||||
VAnchor = VAnchor.Fit,
|
||||
Padding = new BorderDouble(12, 0),
|
||||
BackgroundColor = menuTheme.ActiveTabColor
|
||||
BackgroundColor = menuTheme.BackgroundColor
|
||||
};
|
||||
|
||||
var container = new FlowLayoutWidget(FlowDirection.TopToBottom)
|
||||
|
|
|
|||
|
|
@ -2806,7 +2806,7 @@ If you experience adhesion problems, please re-run leveling."
|
|||
|
||||
var overlay = new GuiWidget()
|
||||
{
|
||||
BackgroundColor = AppContext.Theme.ActiveTabColor,
|
||||
BackgroundColor = AppContext.Theme.BackgroundColor,
|
||||
};
|
||||
overlay.AnchorAll();
|
||||
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ namespace MatterHackers.MatterControl
|
|||
if (IntPtr.Size == 8)
|
||||
{
|
||||
var graphics = imageBuffer.NewGraphics2D();
|
||||
graphics.Clear(menuTheme.ActiveTabColor);
|
||||
graphics.Clear(menuTheme.BackgroundColor);
|
||||
graphics.Rectangle(imageBuffer.GetBoundingRect(), menuTheme.PrimaryAccentColor);
|
||||
graphics.DrawString("64", imageBuffer.Width / 2, imageBuffer.Height / 2, 8, Agg.Font.Justification.Center, Agg.Font.Baseline.BoundsCenter, color: menuTheme.PrimaryAccentColor);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
/*
|
||||
|
||||
/*
|
||||
Copyright (c) 2018, Lars Brubaker, John Lewin
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -138,8 +139,6 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
}
|
||||
|
||||
public Color TextColor { get; set; } = Color.Black;
|
||||
|
||||
public PresetColors PresetColors { get; set; } = new PresetColors();
|
||||
|
||||
public bool IsDarkTheme { get; set; }
|
||||
|
|
@ -149,7 +148,9 @@ namespace MatterHackers.MatterControl
|
|||
public Color Shade { get; set; }
|
||||
public Color DarkShade { get; set; }
|
||||
|
||||
public Color ActiveTabColor { get; set; }
|
||||
public Color BackgroundColor { get; set; }
|
||||
public Color TextColor { get; set; } = Color.Black;
|
||||
|
||||
public Color TabBarBackground { get; set; }
|
||||
public Color InactiveTabColor { get; set; }
|
||||
public Color InteractionLayerOverlayColor { get; set; }
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage
|
|||
var primaryAccentColor = theme.PrimaryAccentColor;
|
||||
|
||||
this.Padding = 8;
|
||||
this.BackgroundColor = theme.ActiveTabColor;
|
||||
this.BackgroundColor = theme.BackgroundColor;
|
||||
this.Cursor = Cursors.Hand;
|
||||
|
||||
secondaryBackground = new GuiWidget()
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
var menuTheme = AppContext.MenuTheme;
|
||||
|
||||
this.MenuItemsBackgroundColor = menuTheme.ActiveTabColor;
|
||||
this.MenuItemsBackgroundColor = menuTheme.BackgroundColor;
|
||||
this.MenuItemsTextColor = menuTheme.TextColor;
|
||||
this.MenuItemsBackgroundHoverColor = menuTheme.AccentMimimalOverlay;
|
||||
this.MenuItemsTextHoverColor = menuTheme.TextColor;
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
{
|
||||
Name = item.key + " Tab",
|
||||
InactiveTabColor = Color.Transparent,
|
||||
ActiveTabColor = theme.ActiveTabColor
|
||||
ActiveTabColor = theme.BackgroundColor
|
||||
};
|
||||
|
||||
tab.CloseClicked += (s, e) =>
|
||||
|
|
@ -254,7 +254,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
Width = this.ConstrainedWidth,
|
||||
VAnchor = VAnchor.Stretch,
|
||||
HAnchor = HAnchor.Right,
|
||||
BackgroundColor = theme.ActiveTabColor,
|
||||
BackgroundColor = theme.BackgroundColor,
|
||||
SplitterBarColor = theme.SplitterBackground,
|
||||
SplitterWidth = theme.SplitterWidth,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
Name = "LibraryView",
|
||||
// Drop containers if ShowContainers != 1
|
||||
ContainerFilter = (container) => UserSettings.Instance.ShowContainers,
|
||||
BackgroundColor = theme.ActiveTabColor,
|
||||
BackgroundColor = theme.BackgroundColor,
|
||||
Border = new BorderDouble(top: 1),
|
||||
DoubleClickAction = LibraryListView.DoubleClickActions.PreviewItem
|
||||
};
|
||||
|
|
@ -994,7 +994,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
var feedbackWindow = new SavePartsSheetFeedbackWindow(
|
||||
printItems.Count(),
|
||||
printItems.FirstOrDefault()?.Name,
|
||||
theme.ActiveTabColor);
|
||||
theme.BackgroundColor);
|
||||
|
||||
var currentPartsInQueue = new PartsSheet(printItems, saveParams.FileName);
|
||||
currentPartsInQueue.UpdateRemainingItems += feedbackWindow.StartingNextPart;
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
Name = "LibraryView",
|
||||
// Drop containers if ShowContainers != 1
|
||||
ContainerFilter = (container) => UserSettings.Instance.ShowContainers,
|
||||
BackgroundColor = theme.ActiveTabColor,
|
||||
BackgroundColor = theme.BackgroundColor,
|
||||
Border = new BorderDouble(top: 1)
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
// Create a semi-transparent overlay with the theme color
|
||||
var overlay = new ImageBuffer(bedImage.Width, bedImage.Height);
|
||||
overlay.NewGraphics2D().Clear(new Color(theme.ActiveTabColor, 100));
|
||||
overlay.NewGraphics2D().Clear(new Color(theme.BackgroundColor, 100));
|
||||
|
||||
// Render the overlay onto the bedImage to tint it and reduce its default overbearing light on dark contrast
|
||||
bedImage.NewGraphics2D().Render(overlay, 0, 0);
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
colorNotifier: (newColor) => colorButton.BackgroundColor = newColor)
|
||||
{
|
||||
Padding = theme.DefaultContainerPadding,
|
||||
BackgroundColor = theme.ActiveTabColor,
|
||||
BackgroundColor = theme.BackgroundColor,
|
||||
HAnchor = HAnchor.Fit,
|
||||
VAnchor = VAnchor.Fit
|
||||
};
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
var materialControl = new MaterialControls(AppContext.MenuTheme, currentIndex)
|
||||
{
|
||||
Padding = theme.DefaultContainerPadding,
|
||||
BackgroundColor = AppContext.MenuTheme.ActiveTabColor,
|
||||
BackgroundColor = AppContext.MenuTheme.BackgroundColor,
|
||||
HAnchor = HAnchor.Fit,
|
||||
VAnchor = VAnchor.Fit,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
this.AnchorAll();
|
||||
this.theme = theme;
|
||||
this.Name = "PartPreviewContent";
|
||||
this.BackgroundColor = theme.ActiveTabColor;
|
||||
this.BackgroundColor = theme.BackgroundColor;
|
||||
|
||||
// Push TouchScreenMode into GuiWidget
|
||||
GuiWidget.TouchScreenMode = UserSettings.Instance.IsTouchScreen;
|
||||
|
|
@ -73,7 +73,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
VAnchor = VAnchor.Stretch,
|
||||
HAnchor = HAnchor.Stretch,
|
||||
BackgroundColor = theme.ActiveTabColor,
|
||||
BackgroundColor = theme.BackgroundColor,
|
||||
BorderColor = theme.MinimalShade,
|
||||
Border = new BorderDouble(left: 1),
|
||||
};
|
||||
|
|
@ -103,7 +103,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
// Force the ActionArea to be as high as ButtonHeight
|
||||
tabControl.TabBar.ActionArea.MinimumSize = new Vector2(0, theme.ButtonHeight);
|
||||
tabControl.TabBar.BackgroundColor = theme.TabBarBackground;
|
||||
tabControl.TabBar.BorderColor = theme.ActiveTabColor;
|
||||
tabControl.TabBar.BorderColor = theme.BackgroundColor;
|
||||
|
||||
// Force common padding into top region
|
||||
tabControl.TabBar.Padding = theme.TabbarPadding.Clone(top: theme.TabbarPadding.Top * 2, bottom: 0);
|
||||
|
|
@ -238,7 +238,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
// Library tab
|
||||
var libraryWidget = new LibraryWidget(this, theme)
|
||||
{
|
||||
BackgroundColor = theme.ActiveTabColor
|
||||
BackgroundColor = theme.BackgroundColor
|
||||
};
|
||||
|
||||
tabControl.AddTab(
|
||||
|
|
@ -257,7 +257,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
tabControl,
|
||||
new HardwareTabPage(theme)
|
||||
{
|
||||
BackgroundColor = theme.ActiveTabColor
|
||||
BackgroundColor = theme.BackgroundColor
|
||||
},
|
||||
theme,
|
||||
hasClose: false)
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ namespace MatterHackers.MatterControl
|
|||
HAnchor = HAnchor.Stretch,
|
||||
VAnchor = VAnchor.Stretch,
|
||||
Padding = theme.DefaultContainerPadding,
|
||||
BackgroundColor = theme.ActiveTabColor
|
||||
BackgroundColor = theme.BackgroundColor
|
||||
};
|
||||
|
||||
editWidget = new MHTextEditWidget("", theme, multiLine: true, typeFace: ApplicationController.GetTypeFace(NamedTypeFace.Liberation_Mono))
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
ChromeTab.DrawTabLowerLeft(
|
||||
graphics2D,
|
||||
this.LocalBounds,
|
||||
(parentTabControl.ActiveTab == this.LastTab) ? theme.ActiveTabColor : theme.InactiveTabColor);
|
||||
(parentTabControl.ActiveTab == this.LastTab) ? theme.BackgroundColor : theme.InactiveTabColor);
|
||||
|
||||
base.OnDraw(graphics2D);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
this.sceneContext = sceneContext;
|
||||
this.theme = theme;
|
||||
this.BackgroundColor = theme.ActiveTabColor;
|
||||
this.BackgroundColor = theme.BackgroundColor;
|
||||
this.Padding = 0;
|
||||
this.printer = printer;
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
this.theme = theme;
|
||||
this.VAnchor = VAnchor.Fit;
|
||||
this.HAnchor = HAnchor.Fit;
|
||||
this.BackgroundColor = theme.ActiveTabColor;
|
||||
this.BackgroundColor = theme.BackgroundColor;
|
||||
}
|
||||
|
||||
public HorizontalLine CreateSeparator()
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
var toolbar = new LeftClipFlowLayoutWidget()
|
||||
{
|
||||
BackgroundColor = theme.ActiveTabColor,
|
||||
BackgroundColor = theme.BackgroundColor,
|
||||
Padding = theme.ToolbarPadding,
|
||||
HAnchor = HAnchor.Fit,
|
||||
VAnchor = VAnchor.Fit
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
leadingTabAdornment.AfterDraw += (s, e) =>
|
||||
{
|
||||
var firstItem = this.AllTabs.OfType<ChromeTab>().FirstOrDefault();
|
||||
ChromeTab.DrawTabLowerRight(e.Graphics2D, leadingTabAdornment.LocalBounds, (firstItem == this.ActiveTab) ? theme.ActiveTabColor : theme.InactiveTabColor);
|
||||
ChromeTab.DrawTabLowerRight(e.Graphics2D, leadingTabAdornment.LocalBounds, (firstItem == this.ActiveTab) ? theme.BackgroundColor : theme.InactiveTabColor);
|
||||
};
|
||||
this.TabBar.ActionArea.AddChild(leadingTabAdornment);
|
||||
|
||||
|
|
@ -511,7 +511,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
this.Border = new BorderDouble(top: 1);
|
||||
this.InactiveTabColor = Color.Transparent;
|
||||
this.ActiveTabColor = theme.ActiveTabColor;
|
||||
this.ActiveTabColor = theme.BackgroundColor;
|
||||
|
||||
tabPill.Padding = tabPill.Padding.Clone(top: 10, bottom: 10);
|
||||
}
|
||||
|
|
@ -588,19 +588,19 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
graphics2D.Render(
|
||||
tabShape,
|
||||
(this == activeTab) ? theme.ActiveTabColor : theme.InactiveTabColor);
|
||||
(this == activeTab) ? theme.BackgroundColor : theme.InactiveTabColor);
|
||||
|
||||
if (drawLeftTabOverlap)
|
||||
{
|
||||
DrawTabLowerLeft(
|
||||
graphics2D,
|
||||
rect,
|
||||
(leftSiblingSelected || this == activeTab) ? theme.ActiveTabColor : theme.InactiveTabColor);
|
||||
(leftSiblingSelected || this == activeTab) ? theme.BackgroundColor : theme.InactiveTabColor);
|
||||
}
|
||||
|
||||
if (rightSiblingSelected)
|
||||
{
|
||||
DrawTabLowerRight(graphics2D, rect, theme.ActiveTabColor);
|
||||
DrawTabLowerRight(graphics2D, rect, theme.BackgroundColor);
|
||||
}
|
||||
|
||||
base.OnDraw(graphics2D);
|
||||
|
|
|
|||
|
|
@ -322,10 +322,10 @@ namespace MatterHackers.MeshVisualizer
|
|||
|
||||
gridColors = new GridColors()
|
||||
{
|
||||
Gray = theme.ResolveColor(theme.ActiveTabColor, theme.GetBorderColor((theme.IsDarkTheme ? 35 : 55))),
|
||||
Red = theme.ResolveColor(theme.ActiveTabColor, new Color(Color.Red, (theme.IsDarkTheme ? 105 : 170))),
|
||||
Green = theme.ResolveColor(theme.ActiveTabColor, new Color(Color.Green, (theme.IsDarkTheme ? 105 : 170))),
|
||||
Blue = theme.ResolveColor(theme.ActiveTabColor, new Color(Color.Blue, 195))
|
||||
Gray = theme.ResolveColor(theme.BackgroundColor, theme.GetBorderColor((theme.IsDarkTheme ? 35 : 55))),
|
||||
Red = theme.ResolveColor(theme.BackgroundColor, new Color(Color.Red, (theme.IsDarkTheme ? 105 : 170))),
|
||||
Green = theme.ResolveColor(theme.BackgroundColor, new Color(Color.Green, (theme.IsDarkTheme ? 105 : 170))),
|
||||
Blue = theme.ResolveColor(theme.BackgroundColor, new Color(Color.Blue, 195))
|
||||
};
|
||||
|
||||
gCodeMeshColor = new Color(theme.PrimaryAccentColor, 35);
|
||||
|
|
@ -855,7 +855,7 @@ namespace MatterHackers.MeshVisualizer
|
|||
// only render if we are above the bed
|
||||
if (sceneContext.RendererOptions.RenderBed)
|
||||
{
|
||||
var bedColor = theme.ResolveColor(Color.White, theme.ActiveTabColor.WithAlpha(111));
|
||||
var bedColor = theme.ResolveColor(Color.White, theme.BackgroundColor.WithAlpha(111));
|
||||
|
||||
|
||||
if (!lookingDownOnBed)
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
var column = new FlowLayoutWidget(FlowDirection.TopToBottom)
|
||||
{
|
||||
Padding = theme.DefaultContainerPadding,
|
||||
BackgroundColor = menuTheme.ActiveTabColor
|
||||
BackgroundColor = menuTheme.BackgroundColor
|
||||
};
|
||||
|
||||
column.AddChild(new TextWidget("Options".Localize(), textColor: menuTheme.TextColor)
|
||||
|
|
|
|||
|
|
@ -565,7 +565,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
VAnchor = VAnchor.Fit,
|
||||
};
|
||||
|
||||
var openColor = theme.ResolveColor(theme.ActiveTabColor, theme.SlightShade);
|
||||
var openColor = theme.ResolveColor(theme.BackgroundColor, theme.SlightShade);
|
||||
|
||||
PopupMenuButton libraryPopup = null;
|
||||
libraryPopup = new PopupMenuButton(buttonView, theme)
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
private void SetBackgroundColor()
|
||||
{
|
||||
this.BackgroundColor = theme.ActiveTabColor;
|
||||
this.BackgroundColor = theme.BackgroundColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -231,7 +231,7 @@ namespace MatterHackers.MatterControl
|
|||
var description = new GuiWidget();
|
||||
var markdownWidget = new MarkdownWidget(theme)
|
||||
{
|
||||
BackgroundColor = theme.ResolveColor(theme.ActiveTabColor, new Color(Color.White, 20)),
|
||||
BackgroundColor = theme.ResolveColor(theme.BackgroundColor, new Color(Color.White, 20)),
|
||||
Padding = new BorderDouble(left: theme.DefaultContainerPadding / 2)
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
{
|
||||
Name = category.Name + " Tab",
|
||||
InactiveTabColor = Color.Transparent,
|
||||
ActiveTabColor = theme.ActiveTabColor
|
||||
ActiveTabColor = theme.BackgroundColor
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
HAnchor = HAnchor.Stretch,
|
||||
VAnchor = VAnchor.Stretch,
|
||||
Padding = theme.DefaultContainerPadding,
|
||||
BackgroundColor = theme.ActiveTabColor
|
||||
BackgroundColor = theme.BackgroundColor
|
||||
};
|
||||
|
||||
editWidget = new MHTextEditWidget("", theme, multiLine: true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue