Use dedicated theme for menus, prefer theme colors over explicit refs
- Revise icon loader to take an Invert bool instead of custom enum - Remove icon loader static ref to ActiveTheme.Instance - Pass contextual theme.InvertIcons for theme specific invert behavior
This commit is contained in:
parent
d3ef1d354e
commit
37a0b64b02
54 changed files with 231 additions and 241 deletions
|
|
@ -59,12 +59,11 @@ namespace MatterHackers.MatterControl.PrinterControls
|
|||
this.AddChild(settingsRow = new SettingsRow(
|
||||
"Print Leveling Plane".Localize(),
|
||||
null,
|
||||
theme.Colors.PrimaryTextColor,
|
||||
theme,
|
||||
AggContext.StaticData.LoadIcon("leveling_32x32.png", 16, 16, IconColor.Theme)));
|
||||
AggContext.StaticData.LoadIcon("leveling_32x32.png", 16, 16, theme.InvertIcons)));
|
||||
|
||||
// run leveling button
|
||||
var runWizardButton = new IconButton(AggContext.StaticData.LoadIcon("fa-cog_16.png", IconColor.Theme), theme)
|
||||
var runWizardButton = new IconButton(AggContext.StaticData.LoadIcon("fa-cog_16.png", theme.InvertIcons), theme)
|
||||
{
|
||||
VAnchor = VAnchor.Center,
|
||||
Margin = theme.ButtonSpacing,
|
||||
|
|
@ -109,11 +108,10 @@ namespace MatterHackers.MatterControl.PrinterControls
|
|||
this.AddChild(settingsRow = new SettingsRow(
|
||||
"Print Leveling Probe".Localize(),
|
||||
null,
|
||||
theme.Colors.PrimaryTextColor,
|
||||
theme,
|
||||
AggContext.StaticData.LoadIcon("probing_32x32.png", 16, 16, IconColor.Theme)));
|
||||
AggContext.StaticData.LoadIcon("probing_32x32.png", 16, 16, theme.InvertIcons)));
|
||||
|
||||
var runCalibrateProbeButton = new IconButton(AggContext.StaticData.LoadIcon("fa-cog_16.png", IconColor.Theme), theme)
|
||||
var runCalibrateProbeButton = new IconButton(AggContext.StaticData.LoadIcon("fa-cog_16.png", theme.InvertIcons), theme)
|
||||
{
|
||||
VAnchor = VAnchor.Center,
|
||||
Margin = theme.ButtonSpacing,
|
||||
|
|
@ -140,7 +138,7 @@ namespace MatterHackers.MatterControl.PrinterControls
|
|||
|
||||
public static SectionWidget CreateSection(PrinterConfig printer, ThemeConfig theme)
|
||||
{
|
||||
var editButton = new IconButton(AggContext.StaticData.LoadIcon("icon_edit.png", 16, 16, IconColor.Theme), theme);
|
||||
var editButton = new IconButton(AggContext.StaticData.LoadIcon("icon_edit.png", 16, 16, theme.InvertIcons), theme);
|
||||
editButton.Click += (s, e) =>
|
||||
{
|
||||
DialogWindow.Show(new EditLevelingSettingsPage(printer));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue