Use Icon instead of Text buttons for Configure actions

- Issue MatterHackers/MCCentral#2699
This commit is contained in:
John Lewin 2018-02-01 23:11:22 -08:00
parent c6d5605893
commit 155a175dfa
3 changed files with 17 additions and 9 deletions

View file

@ -48,11 +48,14 @@ namespace MatterHackers.MatterControl.PrinterControls
buttonRow.AddChild(new HorizontalSpacer());
// configure button
runPrintLevelingButton = new TextButton("Configure".Localize(), theme);
runPrintLevelingButton.Margin = theme.ButtonSpacing;
runPrintLevelingButton.BackgroundColor = theme.MinimalShade;
runPrintLevelingButton.VAnchor = VAnchor.Center;
runPrintLevelingButton.Click += (sender, e) =>
var configureIcon = AggContext.StaticData.LoadIcon("fa-cog_16.png", IconColor.Raw);
runPrintLevelingButton = new IconButton(configureIcon, theme)
{
ToolTipText = "Configure".Localize(),
Margin = theme.ButtonSpacing,
VAnchor = VAnchor.Center
};
runPrintLevelingButton.Click += (s, e) =>
{
UiThread.RunOnIdle(() => LevelWizardBase.ShowPrintLevelWizard(printer, LevelWizardBase.RuningState.UserRequestedCalibration));
};