More consistent manual controls disabled styling
- Issue MatterHackers/MCCentral#2687 Inconsistent disabled styling
This commit is contained in:
parent
580f57bdff
commit
eb0b7255b6
4 changed files with 10 additions and 15 deletions
|
|
@ -14,7 +14,7 @@ namespace MatterHackers.MatterControl.PrinterControls
|
||||||
{
|
{
|
||||||
private EventHandler unregisterEvents;
|
private EventHandler unregisterEvents;
|
||||||
private EditLevelingSettingsWindow editLevelingSettingsWindow;
|
private EditLevelingSettingsWindow editLevelingSettingsWindow;
|
||||||
private Button runPrintLevelingButton;
|
private GuiWidget runPrintLevelingButton;
|
||||||
|
|
||||||
private TextImageButtonFactory buttonFactory;
|
private TextImageButtonFactory buttonFactory;
|
||||||
private PrinterConfig printer;
|
private PrinterConfig printer;
|
||||||
|
|
@ -32,7 +32,7 @@ namespace MatterHackers.MatterControl.PrinterControls
|
||||||
};
|
};
|
||||||
|
|
||||||
buttonRow.AddChild(
|
buttonRow.AddChild(
|
||||||
new ImageWidget(AggContext.StaticData.LoadIcon("leveling_32x32.png", 24, 24, IconColor.Theme))
|
new IconButton(AggContext.StaticData.LoadIcon("leveling_32x32.png", 24, 24, IconColor.Theme), theme)
|
||||||
{
|
{
|
||||||
Margin = new BorderDouble(right: 6),
|
Margin = new BorderDouble(right: 6),
|
||||||
VAnchor = VAnchor.Center
|
VAnchor = VAnchor.Center
|
||||||
|
|
@ -40,18 +40,18 @@ namespace MatterHackers.MatterControl.PrinterControls
|
||||||
|
|
||||||
// label
|
// label
|
||||||
buttonRow.AddChild(
|
buttonRow.AddChild(
|
||||||
new TextWidget("", textColor: theme.Colors.PrimaryTextColor, pointSize: theme.DefaultFontSize)
|
new TextWidget("Software Print Leveling".Localize(), textColor: theme.Colors.PrimaryTextColor, pointSize: theme.DefaultFontSize)
|
||||||
{
|
{
|
||||||
AutoExpandBoundsToText = true,
|
AutoExpandBoundsToText = true,
|
||||||
VAnchor = VAnchor.Center,
|
VAnchor = VAnchor.Center,
|
||||||
Text = "Software Print Leveling".Localize()
|
|
||||||
});
|
});
|
||||||
|
|
||||||
buttonRow.AddChild(new HorizontalSpacer());
|
buttonRow.AddChild(new HorizontalSpacer());
|
||||||
|
|
||||||
// configure button
|
// configure button
|
||||||
runPrintLevelingButton = buttonFactory.Generate("Configure".Localize().ToUpper());
|
runPrintLevelingButton = new TextButton("Configure".Localize(), theme);
|
||||||
runPrintLevelingButton.Margin = new BorderDouble(left: 6);
|
runPrintLevelingButton.Margin = theme.ButtonSpacing;
|
||||||
|
runPrintLevelingButton.BackgroundColor = theme.MinimalShade;
|
||||||
runPrintLevelingButton.VAnchor = VAnchor.Center;
|
runPrintLevelingButton.VAnchor = VAnchor.Center;
|
||||||
runPrintLevelingButton.Click += (sender, e) =>
|
runPrintLevelingButton.Click += (sender, e) =>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -67,10 +67,9 @@ namespace MatterHackers.MatterControl.PrinterControls
|
||||||
VAnchor = VAnchor.Fit
|
VAnchor = VAnchor.Fit
|
||||||
};
|
};
|
||||||
|
|
||||||
var feedRateDescription = new TextWidget("Speed Multiplier".Localize(), pointSize: theme.DefaultFontSize)
|
var feedRateDescription = new TextWidget("Speed Multiplier".Localize(), pointSize: theme.DefaultFontSize, textColor: theme.Colors.PrimaryTextColor)
|
||||||
{
|
{
|
||||||
MinimumSize = new Vector2(140, 0) * GuiWidget.DeviceScale,
|
MinimumSize = new Vector2(140, 0) * GuiWidget.DeviceScale,
|
||||||
TextColor = ActiveTheme.Instance.PrimaryTextColor,
|
|
||||||
VAnchor = VAnchor.Center,
|
VAnchor = VAnchor.Center,
|
||||||
};
|
};
|
||||||
row.AddChild(feedRateDescription);
|
row.AddChild(feedRateDescription);
|
||||||
|
|
@ -132,10 +131,9 @@ namespace MatterHackers.MatterControl.PrinterControls
|
||||||
VAnchor = VAnchor.Fit
|
VAnchor = VAnchor.Fit
|
||||||
};
|
};
|
||||||
|
|
||||||
var extrusionDescription = new TextWidget("Extrusion Multiplier".Localize(), pointSize: theme.DefaultFontSize)
|
var extrusionDescription = new TextWidget("Extrusion Multiplier".Localize(), pointSize: theme.DefaultFontSize, textColor: theme.Colors.PrimaryTextColor)
|
||||||
{
|
{
|
||||||
MinimumSize = new Vector2(140, 0) * GuiWidget.DeviceScale,
|
MinimumSize = new Vector2(140, 0) * GuiWidget.DeviceScale,
|
||||||
TextColor = ActiveTheme.Instance.PrimaryTextColor,
|
|
||||||
VAnchor = VAnchor.Center
|
VAnchor = VAnchor.Center
|
||||||
};
|
};
|
||||||
row.AddChild(extrusionDescription);
|
row.AddChild(extrusionDescription);
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,7 @@ namespace MatterHackers.MatterControl.PrinterControls
|
||||||
//private PrinterConfig printer;
|
//private PrinterConfig printer;
|
||||||
private MacroControls(PrinterConfig printer, ThemeConfig theme)
|
private MacroControls(PrinterConfig printer, ThemeConfig theme)
|
||||||
{
|
{
|
||||||
var noMacrosFound = new TextWidget("No macros are currently set up for this printer.".Localize(), pointSize: 10)
|
var noMacrosFound = new TextWidget("No macros are currently set up for this printer.".Localize(), pointSize: 10, textColor: theme.Colors.PrimaryTextColor);
|
||||||
{
|
|
||||||
TextColor = ActiveTheme.Instance.PrimaryTextColor,
|
|
||||||
};
|
|
||||||
this.AddChild(noMacrosFound);
|
this.AddChild(noMacrosFound);
|
||||||
|
|
||||||
if (printer.Settings?.GetMacros(MacroUiLocation.Controls).Any() != true)
|
if (printer.Settings?.GetMacros(MacroUiLocation.Controls).Any() != true)
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit ecec8c48d63c0b35c96ca8988655d83d806ed00d
|
Subproject commit 9de4051d4a7b124a105e49da6cb8b0fd2304b258
|
||||||
Loading…
Add table
Add a link
Reference in a new issue