Refactoring and creating new RemovePreMultipliedProcess
This commit is contained in:
parent
f6511395ad
commit
569d016d30
61 changed files with 183 additions and 183 deletions
|
|
@ -66,7 +66,7 @@ namespace MatterHackers.MatterControl.ActionBar
|
||||||
this.MakeScrollable = false;
|
this.MakeScrollable = false;
|
||||||
this.AlignToRightEdge = true;
|
this.AlignToRightEdge = true;
|
||||||
|
|
||||||
ImageWidget = new ImageWidget(StaticData.Instance.LoadIcon("hotend.png", 14, 14).SetToColor(theme.TextColor))
|
ImageWidget = new ImageWidget(StaticData.Instance.LoadIcon("hotend.png", 14, 14).GrayToColor(theme.TextColor))
|
||||||
{
|
{
|
||||||
VAnchor = VAnchor.Center,
|
VAnchor = VAnchor.Center,
|
||||||
Margin = new BorderDouble(right: 5)
|
Margin = new BorderDouble(right: 5)
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ namespace MatterHackers.MatterControl.ActionBar
|
||||||
this.DisplayCurrentTemperature();
|
this.DisplayCurrentTemperature();
|
||||||
this.ToolTipText = "Bed Temperature".Localize();
|
this.ToolTipText = "Bed Temperature".Localize();
|
||||||
|
|
||||||
this.ImageWidget.Image = StaticData.Instance.LoadIcon("bed.png", 16, 16).SetToColor(theme.TextColor);
|
this.ImageWidget.Image = StaticData.Instance.LoadIcon("bed.png", 16, 16).GrayToColor(theme.TextColor);
|
||||||
|
|
||||||
this.PopupContent = this.GetPopupContent(ApplicationController.Instance.MenuTheme);
|
this.PopupContent = this.GetPopupContent(ApplicationController.Instance.MenuTheme);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -381,7 +381,7 @@ namespace MatterHackers.MatterControl.ActionBar
|
||||||
// material can be changed even when the printer is not connected
|
// material can be changed even when the printer is not connected
|
||||||
alwaysEnabled.Add(materialSettingsRow);
|
alwaysEnabled.Add(materialSettingsRow);
|
||||||
// add in a shop button
|
// add in a shop button
|
||||||
var shopButton = new ThemedTextIconButton("Shop".Localize(), StaticData.Instance.LoadIcon("cart.png", 16, 16).SetToColor(menuTheme.TextColor), theme)
|
var shopButton = new ThemedTextIconButton("Shop".Localize(), StaticData.Instance.LoadIcon("cart.png", 16, 16).GrayToColor(menuTheme.TextColor), theme)
|
||||||
{
|
{
|
||||||
BackgroundColor = theme.SlightShade,
|
BackgroundColor = theme.SlightShade,
|
||||||
HoverColor = theme.SlightShade.WithAlpha(75),
|
HoverColor = theme.SlightShade.WithAlpha(75),
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
ID = "Export",
|
ID = "Export",
|
||||||
Title = "Export".Localize(),
|
Title = "Export".Localize(),
|
||||||
Icon = StaticData.Instance.LoadIcon("cube_export.png", 16, 16).SetToColor(MenuTheme.TextColor),
|
Icon = StaticData.Instance.LoadIcon("cube_export.png", 16, 16).GrayToColor(MenuTheme.TextColor),
|
||||||
Action = () =>
|
Action = () =>
|
||||||
{
|
{
|
||||||
Instance.ExportLibraryItems(
|
Instance.ExportLibraryItems(
|
||||||
|
|
@ -767,7 +767,7 @@ namespace MatterHackers.MatterControl
|
||||||
new NamedAction()
|
new NamedAction()
|
||||||
{
|
{
|
||||||
ID = "Delete",
|
ID = "Delete",
|
||||||
Icon = StaticData.Instance.LoadIcon("remove.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = StaticData.Instance.LoadIcon("remove.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
Title = "Remove".Localize(),
|
Title = "Remove".Localize(),
|
||||||
Action = sceneContext.Scene.DeleteSelection,
|
Action = sceneContext.Scene.DeleteSelection,
|
||||||
IsEnabled = () => sceneContext.Scene.SelectedItem != null
|
IsEnabled = () => sceneContext.Scene.SelectedItem != null
|
||||||
|
|
@ -776,7 +776,7 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
ID = "Export",
|
ID = "Export",
|
||||||
Title = "Export".Localize(),
|
Title = "Export".Localize(),
|
||||||
Icon = StaticData.Instance.LoadIcon("cube_export.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = StaticData.Instance.LoadIcon("cube_export.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
Action = () =>
|
Action = () =>
|
||||||
{
|
{
|
||||||
ApplicationController.Instance.ExportLibraryItems(
|
ApplicationController.Instance.ExportLibraryItems(
|
||||||
|
|
@ -823,7 +823,7 @@ namespace MatterHackers.MatterControl
|
||||||
await sceneContext.Scene.AutoArrangeChildren(view3DWidget.BedCenter).ConfigureAwait(false);
|
await sceneContext.Scene.AutoArrangeChildren(view3DWidget.BedCenter).ConfigureAwait(false);
|
||||||
},
|
},
|
||||||
IsEnabled = () => sceneContext.EditableScene,
|
IsEnabled = () => sceneContext.EditableScene,
|
||||||
Icon = StaticData.Instance.LoadIcon("arrange_all.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = StaticData.Instance.LoadIcon("arrange_all.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
},
|
},
|
||||||
new NamedAction()
|
new NamedAction()
|
||||||
{
|
{
|
||||||
|
|
@ -2614,7 +2614,7 @@ namespace MatterHackers.MatterControl
|
||||||
VAnchor = VAnchor.Stretch
|
VAnchor = VAnchor.Stretch
|
||||||
};
|
};
|
||||||
|
|
||||||
var icon = StaticData.Instance.LoadIcon("help_page.png", 16, 16).SetToColor(theme.TextColor);
|
var icon = StaticData.Instance.LoadIcon("help_page.png", 16, 16).GrayToColor(theme.TextColor);
|
||||||
|
|
||||||
helpDocsTab = new ChromeTab("HelpDocs", "Help".Localize(), tabControl, helpTreePanel, theme, icon)
|
helpDocsTab = new ChromeTab("HelpDocs", "Help".Localize(), tabControl, helpTreePanel, theme, icon)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ namespace MatterHackers.MatterControl
|
||||||
};
|
};
|
||||||
this.AddChild(row);
|
this.AddChild(row);
|
||||||
|
|
||||||
row.AddChild(new ThemedIconButton(StaticData.Instance.LoadIcon("mh-app-logo.png", 16, 16).SetToColor(theme.TextColor), theme)
|
row.AddChild(new ThemedIconButton(StaticData.Instance.LoadIcon("mh-app-logo.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
VAnchor = VAnchor.Center,
|
VAnchor = VAnchor.Center,
|
||||||
Margin = theme.ButtonSpacing,
|
Margin = theme.ButtonSpacing,
|
||||||
|
|
@ -89,11 +89,11 @@ namespace MatterHackers.MatterControl
|
||||||
MinimumSize = new Vector2(300, 0)
|
MinimumSize = new Vector2(300, 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
var linkIcon = StaticData.Instance.LoadIcon("fa-link_16.png", 16, 16).SetToColor(menuTheme.TextColor);
|
var linkIcon = StaticData.Instance.LoadIcon("fa-link_16.png", 16, 16).GrayToColor(menuTheme.TextColor);
|
||||||
|
|
||||||
PopupMenu.MenuItem menuItem;
|
PopupMenu.MenuItem menuItem;
|
||||||
|
|
||||||
menuItem = popupMenu.CreateMenuItem("Open System File", StaticData.Instance.LoadIcon("fa-folder-open_16.png", 16, 16).SetToColor(menuTheme.TextColor));
|
menuItem = popupMenu.CreateMenuItem("Open System File", StaticData.Instance.LoadIcon("fa-folder-open_16.png", 16, 16).GrayToColor(menuTheme.TextColor));
|
||||||
menuItem.Click += (s, e) => ApplicationController.OpenFileWithSystemDialog((fileNames) =>
|
menuItem.Click += (s, e) => ApplicationController.OpenFileWithSystemDialog((fileNames) =>
|
||||||
{
|
{
|
||||||
if (fileNames != null && fileNames.Any())
|
if (fileNames != null && fileNames.Any())
|
||||||
|
|
@ -104,10 +104,10 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
popupMenu.CreateSeparator();
|
popupMenu.CreateSeparator();
|
||||||
|
|
||||||
menuItem = popupMenu.CreateMenuItem("Help".Localize(), StaticData.Instance.LoadIcon("help_page.png", 16, 16).SetToColor(menuTheme.TextColor));
|
menuItem = popupMenu.CreateMenuItem("Help".Localize(), StaticData.Instance.LoadIcon("help_page.png", 16, 16).GrayToColor(menuTheme.TextColor));
|
||||||
menuItem.Click += (s, e) => ApplicationController.Instance.ShowApplicationHelp("Docs");
|
menuItem.Click += (s, e) => ApplicationController.Instance.ShowApplicationHelp("Docs");
|
||||||
|
|
||||||
menuItem = popupMenu.CreateMenuItem("Interface Tour".Localize(), StaticData.Instance.LoadIcon("tour.png", 16, 16).SetToColor(menuTheme.TextColor));
|
menuItem = popupMenu.CreateMenuItem("Interface Tour".Localize(), StaticData.Instance.LoadIcon("tour.png", 16, 16).GrayToColor(menuTheme.TextColor));
|
||||||
menuItem.Click += (s, e) =>
|
menuItem.Click += (s, e) =>
|
||||||
{
|
{
|
||||||
UiThread.RunOnIdle(() =>
|
UiThread.RunOnIdle(() =>
|
||||||
|
|
@ -120,7 +120,7 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
popupMenu.CreateSeparator();
|
popupMenu.CreateSeparator();
|
||||||
|
|
||||||
menuItem = popupMenu.CreateMenuItem("Check For Update".Localize(), StaticData.Instance.LoadIcon("update.png", 16, 16).SetToColor(menuTheme.TextColor));
|
menuItem = popupMenu.CreateMenuItem("Check For Update".Localize(), StaticData.Instance.LoadIcon("update.png", 16, 16).GrayToColor(menuTheme.TextColor));
|
||||||
menuItem.Click += (s, e) => UiThread.RunOnIdle(() =>
|
menuItem.Click += (s, e) => UiThread.RunOnIdle(() =>
|
||||||
{
|
{
|
||||||
UpdateControlData.Instance.CheckForUpdate();
|
UpdateControlData.Instance.CheckForUpdate();
|
||||||
|
|
@ -130,7 +130,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
popupMenu.CreateSeparator();
|
popupMenu.CreateSeparator();
|
||||||
|
|
||||||
menuItem = popupMenu.CreateMenuItem("Settings".Localize(), StaticData.Instance.LoadIcon("fa-cog_16.png", 16, 16).SetToColor(menuTheme.TextColor));
|
menuItem = popupMenu.CreateMenuItem("Settings".Localize(), StaticData.Instance.LoadIcon("fa-cog_16.png", 16, 16).GrayToColor(menuTheme.TextColor));
|
||||||
menuItem.Click += (s, e) => DialogWindow.Show<ApplicationSettingsPage>();
|
menuItem.Click += (s, e) => DialogWindow.Show<ApplicationSettingsPage>();
|
||||||
menuItem.Name = "Settings MenuItem";
|
menuItem.Name = "Settings MenuItem";
|
||||||
|
|
||||||
|
|
@ -140,7 +140,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
if (IntPtr.Size == 8)
|
if (IntPtr.Size == 8)
|
||||||
{
|
{
|
||||||
indicatorIcon = StaticData.Instance.LoadIcon("x64.png", 16, 16).SetToColor(menuTheme.TextColor);
|
indicatorIcon = StaticData.Instance.LoadIcon("x64.png", 16, 16).GrayToColor(menuTheme.TextColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
popupMenu.CreateSubMenu("Community".Localize(), menuTheme, (modifyMenu) =>
|
popupMenu.CreateSubMenu("Community".Localize(), menuTheme, (modifyMenu) =>
|
||||||
|
|
@ -159,9 +159,9 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
modifyMenu.CreateSeparator();
|
modifyMenu.CreateSeparator();
|
||||||
|
|
||||||
menuItem = modifyMenu.CreateMenuItem("Report a Bug".Localize(), StaticData.Instance.LoadIcon("feedback.png", 16, 16).SetToColor(menuTheme.TextColor));
|
menuItem = modifyMenu.CreateMenuItem("Report a Bug".Localize(), StaticData.Instance.LoadIcon("feedback.png", 16, 16).GrayToColor(menuTheme.TextColor));
|
||||||
menuItem.Click += (s, e) => ApplicationController.LaunchBrowser("https://github.com/MatterHackers/MatterControl/issues");
|
menuItem.Click += (s, e) => ApplicationController.LaunchBrowser("https://github.com/MatterHackers/MatterControl/issues");
|
||||||
}, StaticData.Instance.LoadIcon("feedback.png", 16, 16).SetToColor(menuTheme.TextColor));
|
}, StaticData.Instance.LoadIcon("feedback.png", 16, 16).GrayToColor(menuTheme.TextColor));
|
||||||
|
|
||||||
popupMenu.CreateSeparator();
|
popupMenu.CreateSeparator();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public ImageBuffer DefaultThumbnail() => StaticData.Instance.LoadIcon("cube.png", 16, 16).SetToColor(Theme.TextColor);
|
public ImageBuffer DefaultThumbnail() => StaticData.Instance.LoadIcon("cube.png", 16, 16).GrayToColor(Theme.TextColor);
|
||||||
|
|
||||||
public ImageBuffer LoadCachedImage(string cacheId, int width, int height)
|
public ImageBuffer LoadCachedImage(string cacheId, int width, int height)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
scene.SelectedItem = baseMesh;
|
scene.SelectedItem = baseMesh;
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("add_base.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("add_base.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "A path must be selected".Localize().Stars(),
|
HelpTextGetter = () => "A path must be selected".Localize().Stars(),
|
||||||
// this is for when base is working with generic meshes
|
// this is for when base is working with generic meshes
|
||||||
//IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && !(sceneContext.Scene.SelectedItem.IsPathObject()),
|
//IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && !(sceneContext.Scene.SelectedItem.IsPathObject()),
|
||||||
|
|
@ -246,7 +246,7 @@ namespace MatterHackers.MatterControl
|
||||||
&& componentObject.Finalized
|
&& componentObject.Finalized
|
||||||
&& !componentObject.ProOnly;
|
&& !componentObject.ProOnly;
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("scale_32x32.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("scale_32x32.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "A component must be selected".Localize().Stars(),
|
HelpTextGetter = () => "A component must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && (sceneContext.Scene.SelectedItem is ComponentObject3D),
|
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && (sceneContext.Scene.SelectedItem is ComponentObject3D),
|
||||||
};
|
};
|
||||||
|
|
@ -326,7 +326,7 @@ namespace MatterHackers.MatterControl
|
||||||
// Invalidate image to kick off rebuild of ImageConverter stack
|
// Invalidate image to kick off rebuild of ImageConverter stack
|
||||||
imageObject.Invalidate(InvalidateType.Image);
|
imageObject.Invalidate(InvalidateType.Image);
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("image_converter.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("image_converter.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "An image must be selected".Localize().Stars(),
|
HelpTextGetter = () => "An image must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && sceneContext.Scene.SelectedItem is ImageObject3D,
|
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && sceneContext.Scene.SelectedItem is ImageObject3D,
|
||||||
};
|
};
|
||||||
|
|
@ -360,7 +360,7 @@ namespace MatterHackers.MatterControl
|
||||||
path.Invalidate(InvalidateType.Properties);
|
path.Invalidate(InvalidateType.Properties);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("image_to_path.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("image_to_path.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "An image must be selected".Localize().Stars(),
|
HelpTextGetter = () => "An image must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && sceneContext.Scene.SelectedItem is IImageProvider,
|
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && sceneContext.Scene.SelectedItem is IImageProvider,
|
||||||
};
|
};
|
||||||
|
|
@ -389,7 +389,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
inflatePath.Invalidate(InvalidateType.Properties);
|
inflatePath.Invalidate(InvalidateType.Properties);
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("inflate_path.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("inflate_path.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "A path must be selected".Localize().Stars(),
|
HelpTextGetter = () => "A path must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && sceneContext.Scene.SelectedItem.IsPathObject(),
|
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && sceneContext.Scene.SelectedItem.IsPathObject(),
|
||||||
};
|
};
|
||||||
|
|
@ -422,7 +422,7 @@ namespace MatterHackers.MatterControl
|
||||||
extrude.Invalidate(InvalidateType.Properties);
|
extrude.Invalidate(InvalidateType.Properties);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("linear_extrude.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("linear_extrude.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "A path must be selected".Localize().Stars(),
|
HelpTextGetter = () => "A path must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && sceneContext.Scene.SelectedItem.IsPathObject(),
|
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && sceneContext.Scene.SelectedItem.IsPathObject(),
|
||||||
};
|
};
|
||||||
|
|
@ -455,7 +455,7 @@ namespace MatterHackers.MatterControl
|
||||||
revolve.Invalidate(InvalidateType.Properties);
|
revolve.Invalidate(InvalidateType.Properties);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("revolve.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("revolve.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "A path must be selected".Localize().Stars(),
|
HelpTextGetter = () => "A path must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && sceneContext.Scene.SelectedItem.IsPathObject(),
|
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && sceneContext.Scene.SelectedItem.IsPathObject(),
|
||||||
};
|
};
|
||||||
|
|
@ -498,7 +498,7 @@ namespace MatterHackers.MatterControl
|
||||||
scene.UndoBuffer.AddAndDo(new ReplaceCommand(items, new[] { component }));
|
scene.UndoBuffer.AddAndDo(new ReplaceCommand(items, new[] { component }));
|
||||||
scene.SelectedItem = component;
|
scene.SelectedItem = component;
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("component.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("component.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) =>
|
IsEnabled = (sceneContext) =>
|
||||||
{
|
{
|
||||||
|
|
@ -519,7 +519,7 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
new MirrorObject3D_2().WrapSelectedItemAndSelect(sceneContext.Scene);
|
new MirrorObject3D_2().WrapSelectedItemAndSelect(sceneContext.Scene);
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("mirror_32x32.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("mirror_32x32.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
||||||
};
|
};
|
||||||
|
|
@ -547,7 +547,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
outlinePath.Invalidate(InvalidateType.Properties);
|
outlinePath.Invalidate(InvalidateType.Properties);
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("outline.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("outline.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "A path must be selected".Localize().Stars(),
|
HelpTextGetter = () => "A path must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && sceneContext.Scene.SelectedItem.IsPathObject(),
|
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && sceneContext.Scene.SelectedItem.IsPathObject(),
|
||||||
};
|
};
|
||||||
|
|
@ -563,7 +563,7 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
new RotateObject3D_2().WrapSelectedItemAndSelect(sceneContext.Scene);
|
new RotateObject3D_2().WrapSelectedItemAndSelect(sceneContext.Scene);
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon(Path.Combine("ViewTransformControls", "rotate.png"), 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon(Path.Combine("ViewTransformControls", "rotate.png"), 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null,
|
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null,
|
||||||
};
|
};
|
||||||
|
|
@ -579,7 +579,7 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
new ScaleObject3D_3().WrapSelectedItemAndSelect(sceneContext.Scene);
|
new ScaleObject3D_3().WrapSelectedItemAndSelect(sceneContext.Scene);
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("scale_32x32.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("scale_32x32.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null,
|
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null,
|
||||||
};
|
};
|
||||||
|
|
@ -607,7 +607,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
smoothPath.Invalidate(InvalidateType.Properties);
|
smoothPath.Invalidate(InvalidateType.Properties);
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("smooth_path.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("smooth_path.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "A path must be selected".Localize().Stars(),
|
HelpTextGetter = () => "A path must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && sceneContext.Scene.SelectedItem.IsPathObject(),
|
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && sceneContext.Scene.SelectedItem.IsPathObject(),
|
||||||
};
|
};
|
||||||
|
|
@ -623,7 +623,7 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
new TranslateObject3D().WrapSelectedItemAndSelect(sceneContext.Scene);
|
new TranslateObject3D().WrapSelectedItemAndSelect(sceneContext.Scene);
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon(Path.Combine("ViewTransformControls", "translate.png"), 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon(Path.Combine("ViewTransformControls", "translate.png"), 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null,
|
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null,
|
||||||
};
|
};
|
||||||
|
|
@ -664,7 +664,7 @@ namespace MatterHackers.MatterControl
|
||||||
align.Name = align.NameFromChildren();
|
align.Name = align.NameFromChildren();
|
||||||
align.NameOverriden = false;
|
align.NameOverriden = false;
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("align_left_dark.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("align_left_dark.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "At least 2 parts must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 2 parts must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem is SelectionGroupObject3D,
|
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem is SelectionGroupObject3D,
|
||||||
};
|
};
|
||||||
|
|
@ -684,7 +684,7 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
return sceneContext.EditableScene && sceneContext.Scene.VisibleMeshes().Any();
|
return sceneContext.EditableScene && sceneContext.Scene.VisibleMeshes().Any();
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("arrange_all.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("arrange_all.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
ShowInModifyMenu = (sceneContext) => false,
|
ShowInModifyMenu = (sceneContext) => false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -868,9 +868,9 @@ namespace MatterHackers.MatterControl
|
||||||
}
|
}
|
||||||
|
|
||||||
// register legacy types so they still show, they don't have ui to create so they don't have icons set dynamically
|
// register legacy types so they still show, they don't have ui to create so they don't have icons set dynamically
|
||||||
Icons.Add(typeof(AlignObject3D), (theme) => StaticData.Instance.LoadIcon("align_left_dark.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply());
|
Icons.Add(typeof(AlignObject3D), (theme) => StaticData.Instance.LoadIcon("align_left_dark.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply());
|
||||||
|
|
||||||
Icons.Add(typeof(ImageObject3D), (theme) => StaticData.Instance.LoadIcon("image_converter.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply());
|
Icons.Add(typeof(ImageObject3D), (theme) => StaticData.Instance.LoadIcon("image_converter.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static SceneOperation CombineOperation()
|
private static SceneOperation CombineOperation()
|
||||||
|
|
@ -890,7 +890,7 @@ namespace MatterHackers.MatterControl
|
||||||
new CombineObject3D_2().WrapSelectedItemAndSelect(sceneContext.Scene);
|
new CombineObject3D_2().WrapSelectedItemAndSelect(sceneContext.Scene);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("combine.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("combine.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "At least 2 parts must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 2 parts must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => BooleanCandidate(sceneContext.Scene.SelectedItem, true),
|
IsEnabled = (sceneContext) => BooleanCandidate(sceneContext.Scene.SelectedItem, true),
|
||||||
};
|
};
|
||||||
|
|
@ -907,7 +907,7 @@ namespace MatterHackers.MatterControl
|
||||||
var curve = new CurveObject3D_3();
|
var curve = new CurveObject3D_3();
|
||||||
curve.WrapSelectedItemAndSelect(sceneContext.Scene);
|
curve.WrapSelectedItemAndSelect(sceneContext.Scene);
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("curve.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = (theme) => StaticData.Instance.LoadIcon("curve.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
||||||
};
|
};
|
||||||
|
|
@ -942,7 +942,7 @@ namespace MatterHackers.MatterControl
|
||||||
scene.UndoBuffer.AddAndDo(new TransformCommand(transformData));
|
scene.UndoBuffer.AddAndDo(new TransformCommand(transformData));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("dual_align.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("dual_align.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "At least 2 parts must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 2 parts must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem is SelectionGroupObject3D,
|
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem is SelectionGroupObject3D,
|
||||||
};
|
};
|
||||||
|
|
@ -976,7 +976,7 @@ namespace MatterHackers.MatterControl
|
||||||
scene.UndoBuffer.AddAndDo(new ReplaceCommand(new[] { selectedItem }, new[] { fit }));
|
scene.UndoBuffer.AddAndDo(new ReplaceCommand(new[] { selectedItem }, new[] { fit }));
|
||||||
scene.SelectedItem = fit;
|
scene.SelectedItem = fit;
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("fit.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = (theme) => StaticData.Instance.LoadIcon("fit.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && !(sceneContext.Scene.SelectedItem is SelectionGroupObject3D),
|
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && !(sceneContext.Scene.SelectedItem is SelectionGroupObject3D),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -997,7 +997,7 @@ namespace MatterHackers.MatterControl
|
||||||
scene.UndoBuffer.AddAndDo(new ReplaceCommand(new[] { selectedItem }, new[] { fit }));
|
scene.UndoBuffer.AddAndDo(new ReplaceCommand(new[] { selectedItem }, new[] { fit }));
|
||||||
scene.SelectedItem = fit;
|
scene.SelectedItem = fit;
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("fit.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = (theme) => StaticData.Instance.LoadIcon("fit.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && !(sceneContext.Scene.SelectedItem is SelectionGroupObject3D),
|
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null && !(sceneContext.Scene.SelectedItem is SelectionGroupObject3D),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -1034,7 +1034,7 @@ namespace MatterHackers.MatterControl
|
||||||
var hollowOut = new HollowOutObject3D();
|
var hollowOut = new HollowOutObject3D();
|
||||||
hollowOut.WrapSelectedItemAndSelect(sceneContext.Scene);
|
hollowOut.WrapSelectedItemAndSelect(sceneContext.Scene);
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("hollow.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = (theme) => StaticData.Instance.LoadIcon("hollow.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
||||||
};
|
};
|
||||||
|
|
@ -1099,7 +1099,7 @@ namespace MatterHackers.MatterControl
|
||||||
},
|
},
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null,
|
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null,
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("lay_flat.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("lay_flat.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1135,7 +1135,7 @@ namespace MatterHackers.MatterControl
|
||||||
},
|
},
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null,
|
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null,
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("update.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("update.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1170,7 +1170,7 @@ namespace MatterHackers.MatterControl
|
||||||
var pinch = new PinchObject3D_3();
|
var pinch = new PinchObject3D_3();
|
||||||
pinch.WrapSelectedItemAndSelect(sceneContext.Scene);
|
pinch.WrapSelectedItemAndSelect(sceneContext.Scene);
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("pinch.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = (theme) => StaticData.Instance.LoadIcon("pinch.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
||||||
};
|
};
|
||||||
|
|
@ -1187,7 +1187,7 @@ namespace MatterHackers.MatterControl
|
||||||
var cut = new PlaneCutObject3D();
|
var cut = new PlaneCutObject3D();
|
||||||
cut.WrapSelectedItemAndSelect(sceneContext.Scene);
|
cut.WrapSelectedItemAndSelect(sceneContext.Scene);
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("plane_cut.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = (theme) => StaticData.Instance.LoadIcon("plane_cut.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
||||||
};
|
};
|
||||||
|
|
@ -1204,7 +1204,7 @@ namespace MatterHackers.MatterControl
|
||||||
var cut = new FindSliceObject3D();
|
var cut = new FindSliceObject3D();
|
||||||
cut.WrapSelectedItemAndSelect(sceneContext.Scene);
|
cut.WrapSelectedItemAndSelect(sceneContext.Scene);
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("plane_cut.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = (theme) => StaticData.Instance.LoadIcon("plane_cut.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
||||||
};
|
};
|
||||||
|
|
@ -1241,7 +1241,7 @@ namespace MatterHackers.MatterControl
|
||||||
var hollowOut = new DecimateObject3D();
|
var hollowOut = new DecimateObject3D();
|
||||||
hollowOut.WrapSelectedItemAndSelect(sceneContext.Scene);
|
hollowOut.WrapSelectedItemAndSelect(sceneContext.Scene);
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("reduce.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = (theme) => StaticData.Instance.LoadIcon("reduce.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
||||||
};
|
};
|
||||||
|
|
@ -1280,7 +1280,7 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
Action = (sceneContext) => sceneContext.Scene.DeleteSelection(),
|
Action = (sceneContext) => sceneContext.Scene.DeleteSelection(),
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("remove.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("remove.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
||||||
ShowInModifyMenu = (sceneContext) => false,
|
ShowInModifyMenu = (sceneContext) => false,
|
||||||
TitleGetter = () => "Remove".Localize(),
|
TitleGetter = () => "Remove".Localize(),
|
||||||
|
|
@ -1299,7 +1299,7 @@ namespace MatterHackers.MatterControl
|
||||||
var hollowOut = new RepairObject3D();
|
var hollowOut = new RepairObject3D();
|
||||||
hollowOut.WrapSelectedItemAndSelect(sceneContext.Scene);
|
hollowOut.WrapSelectedItemAndSelect(sceneContext.Scene);
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("repair.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = (theme) => StaticData.Instance.LoadIcon("repair.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
||||||
};
|
};
|
||||||
|
|
@ -1366,7 +1366,7 @@ namespace MatterHackers.MatterControl
|
||||||
scene.UndoBuffer.AddAndDo(new SetOutputType(selectedItem, allAreSupport ? PrintOutputTypes.Default : PrintOutputTypes.Support));
|
scene.UndoBuffer.AddAndDo(new SetOutputType(selectedItem, allAreSupport ? PrintOutputTypes.Default : PrintOutputTypes.Support));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("support.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("support.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
||||||
};
|
};
|
||||||
|
|
@ -1397,7 +1397,7 @@ namespace MatterHackers.MatterControl
|
||||||
scene.UndoBuffer.AddAndDo(new SetOutputType(selectedItem, allAreWipeTower ? PrintOutputTypes.Default : PrintOutputTypes.WipeTower));
|
scene.UndoBuffer.AddAndDo(new SetOutputType(selectedItem, allAreWipeTower ? PrintOutputTypes.Default : PrintOutputTypes.WipeTower));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("wipe_tower.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("wipe_tower.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
||||||
};
|
};
|
||||||
|
|
@ -1428,7 +1428,7 @@ namespace MatterHackers.MatterControl
|
||||||
scene.UndoBuffer.AddAndDo(new SetOutputType(selectedItem, allAreFuzzy ? PrintOutputTypes.Default : PrintOutputTypes.Fuzzy));
|
scene.UndoBuffer.AddAndDo(new SetOutputType(selectedItem, allAreFuzzy ? PrintOutputTypes.Default : PrintOutputTypes.Fuzzy));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("fuzzy_region.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("fuzzy_region.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
||||||
};
|
};
|
||||||
|
|
@ -1445,7 +1445,7 @@ namespace MatterHackers.MatterControl
|
||||||
var twist = new TwistObject3D();
|
var twist = new TwistObject3D();
|
||||||
twist.WrapSelectedItemAndSelect(sceneContext.Scene);
|
twist.WrapSelectedItemAndSelect(sceneContext.Scene);
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("twist.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = (theme) => StaticData.Instance.LoadIcon("twist.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||||
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem),
|
||||||
};
|
};
|
||||||
|
|
@ -1471,7 +1471,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("ungroup.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
Icon = (theme) => StaticData.Instance.LoadIcon("ungroup.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(),
|
||||||
UiHint = "Shift + G".Localize(),
|
UiHint = "Shift + G".Localize(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -266,7 +266,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
public static GuiWidget CreateSearchButton(this ThemeConfig theme)
|
public static GuiWidget CreateSearchButton(this ThemeConfig theme)
|
||||||
{
|
{
|
||||||
return new ThemedIconButton(StaticData.Instance.LoadIcon("icon_search_24x24.png", 16, 16).SetToColor(theme.TextColor), theme)
|
return new ThemedIconButton(StaticData.Instance.LoadIcon("icon_search_24x24.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
ToolTipText = "Search".Localize(),
|
ToolTipText = "Search".Localize(),
|
||||||
};
|
};
|
||||||
|
|
@ -354,7 +354,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
public static void RebuildTheme(this ThemeConfig theme)
|
public static void RebuildTheme(this ThemeConfig theme)
|
||||||
{
|
{
|
||||||
theme.GeneratingThumbnailIcon = StaticData.Instance.LoadIcon("building_thumbnail_40x40.png", 40, 40).SetToColor(theme.TextColor);
|
theme.GeneratingThumbnailIcon = StaticData.Instance.LoadIcon("building_thumbnail_40x40.png", 40, 40).GrayToColor(theme.TextColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void RemovePrimaryActionStyle(this ThemeConfig theme, GuiWidget guiWidget)
|
public static void RemovePrimaryActionStyle(this ThemeConfig theme, GuiWidget guiWidget)
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
||||||
{
|
{
|
||||||
string imageFile = this.ControlIsPinned ? "Pushpin.png" : "PushpinUnpin.png";
|
string imageFile = this.ControlIsPinned ? "Pushpin.png" : "PushpinUnpin.png";
|
||||||
|
|
||||||
var pinTabButton = new ThemedIconButton(StaticData.Instance.LoadIcon(imageFile, 16, 16).SetToColor(theme.TextColor), theme)
|
var pinTabButton = new ThemedIconButton(StaticData.Instance.LoadIcon(imageFile, 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Name = "Pin Settings Button",
|
Name = "Pin Settings Button",
|
||||||
ToolTipText = this.ControlIsPinned ? "Unpin".Localize() : "Pin".Localize()
|
ToolTipText = this.ControlIsPinned ? "Unpin".Localize() : "Pin".Localize()
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
||||||
this.ActionArea.VAnchor = VAnchor.Stretch;
|
this.ActionArea.VAnchor = VAnchor.Stretch;
|
||||||
this.ActionArea.MinimumSize = new Vector2(0, titleText.Height);
|
this.ActionArea.MinimumSize = new Vector2(0, titleText.Height);
|
||||||
|
|
||||||
var editButton = new ThemedIconButton(StaticData.Instance.LoadIcon("icon_edit.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var editButton = new ThemedIconButton(StaticData.Instance.LoadIcon("icon_edit.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
ToolTipText = editToolTipText ?? "Edit".Localize(),
|
ToolTipText = editToolTipText ?? "Edit".Localize(),
|
||||||
Name = helpArticle.Name + " Edit"
|
Name = helpArticle.Name + " Edit"
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
||||||
public InlineListItemEdit(string title, ThemeConfig theme, string automationName, bool boldFont = false)
|
public InlineListItemEdit(string title, ThemeConfig theme, string automationName, bool boldFont = false)
|
||||||
: base(title, theme, automationName, boldFont)
|
: base(title, theme, automationName, boldFont)
|
||||||
{
|
{
|
||||||
var removeButton = new ThemedIconButton(StaticData.Instance.LoadIcon("remove.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var removeButton = new ThemedIconButton(StaticData.Instance.LoadIcon("remove.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
ToolTipText = "Delete".Localize(),
|
ToolTipText = "Delete".Localize(),
|
||||||
Visible = true,
|
Visible = true,
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
||||||
this.ActionArea.VAnchor = VAnchor.Stretch;
|
this.ActionArea.VAnchor = VAnchor.Stretch;
|
||||||
this.ActionArea.MinimumSize = new Vector2(0, titleText.Height);
|
this.ActionArea.MinimumSize = new Vector2(0, titleText.Height);
|
||||||
|
|
||||||
saveButton = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-save_16.png", 16, 16).SetToColor(theme.TextColor), theme)
|
saveButton = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-save_16.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
ToolTipText = "Save".Localize(),
|
ToolTipText = "Save".Localize(),
|
||||||
Visible = false,
|
Visible = false,
|
||||||
|
|
@ -104,7 +104,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
||||||
|
|
||||||
rightPanel = new FlowLayoutWidget();
|
rightPanel = new FlowLayoutWidget();
|
||||||
|
|
||||||
var icon = editable ? StaticData.Instance.LoadIcon("icon_edit.png", 16, 16).SetToColor(theme.TextColor) : new ImageBuffer(16, 16);
|
var icon = editable ? StaticData.Instance.LoadIcon("icon_edit.png", 16, 16).GrayToColor(theme.TextColor) : new ImageBuffer(16, 16);
|
||||||
|
|
||||||
editButton = new ThemedIconButton(icon, theme)
|
editButton = new ThemedIconButton(icon, theme)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
||||||
{
|
{
|
||||||
this.CloseChildren();
|
this.CloseChildren();
|
||||||
|
|
||||||
var backButton = new ThemedIconButton(StaticData.Instance.LoadIcon(Path.Combine("Library", "back.png"), 20, 20).SetToColor(theme.TextColor), theme)
|
var backButton = new ThemedIconButton(StaticData.Instance.LoadIcon(Path.Combine("Library", "back.png"), 20, 20).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
VAnchor = VAnchor.Fit | VAnchor.Center,
|
VAnchor = VAnchor.Fit | VAnchor.Center,
|
||||||
Enabled = currentContainer.Parent != null,
|
Enabled = currentContainer.Parent != null,
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ namespace MatterHackers.MatterControl.Plugins.Lithophane
|
||||||
IsEnabled = (sceneContext) => sceneContext?.Scene?.SelectedItem is IImageProvider,
|
IsEnabled = (sceneContext) => sceneContext?.Scene?.SelectedItem is IImageProvider,
|
||||||
HelpTextGetter = () => "An image must be selected".Localize().Stars(),
|
HelpTextGetter = () => "An image must be selected".Localize().Stars(),
|
||||||
ShowInModifyMenu = (sceneContext) => sceneContext?.Scene?.SelectedItem is IImageProvider,
|
ShowInModifyMenu = (sceneContext) => sceneContext?.Scene?.SelectedItem is IImageProvider,
|
||||||
Icon = (theme) => StaticData.Instance.LoadIcon("lithophane.png", 16, 16).SetToColor(theme.TextColor)
|
Icon = (theme) => StaticData.Instance.LoadIcon("lithophane.png", 16, 16).GrayToColor(theme.TextColor)
|
||||||
},
|
},
|
||||||
"Image");
|
"Image");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1117,7 +1117,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
||||||
if (directoryPathAttribute != null)
|
if (directoryPathAttribute != null)
|
||||||
{
|
{
|
||||||
// add a browse button
|
// add a browse button
|
||||||
var browseButton = new ThemedIconButton(StaticData.Instance.LoadIcon(Path.Combine("Library", "folder.png"), 16, 16).SetToColor(theme.TextColor), theme)
|
var browseButton = new ThemedIconButton(StaticData.Instance.LoadIcon(Path.Combine("Library", "folder.png"), 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
ToolTipText = "Select Folder".Localize(),
|
ToolTipText = "Select Folder".Localize(),
|
||||||
};
|
};
|
||||||
|
|
@ -1327,7 +1327,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
||||||
VAnchor = VAnchor.Center
|
VAnchor = VAnchor.Center
|
||||||
};
|
};
|
||||||
searchRow.AddChild(searchField);
|
searchRow.AddChild(searchField);
|
||||||
var searchButton = new ThemedIconButton(StaticData.Instance.LoadIcon("icon_search_24x24.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var searchButton = new ThemedIconButton(StaticData.Instance.LoadIcon("icon_search_24x24.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
ToolTipText = "Search".Localize(),
|
ToolTipText = "Search".Localize(),
|
||||||
};
|
};
|
||||||
|
|
@ -1572,7 +1572,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
||||||
|
|
||||||
public static GuiWidget GetUnlockRow(ThemeConfig theme, string url)
|
public static GuiWidget GetUnlockRow(ThemeConfig theme, string url)
|
||||||
{
|
{
|
||||||
var detailsLink = new ThemedTextIconButton("Unlock".Localize(), StaticData.Instance.LoadIcon("locked.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var detailsLink = new ThemedTextIconButton("Unlock".Localize(), StaticData.Instance.LoadIcon("locked.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Margin = 5,
|
Margin = 5,
|
||||||
ToolTipText = "Visit MatterHackers.com to Purchase".Localize()
|
ToolTipText = "Visit MatterHackers.com to Purchase".Localize()
|
||||||
|
|
@ -1590,7 +1590,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
||||||
{
|
{
|
||||||
if (item.GetType().GetCustomAttributes(typeof(WebPageLinkAttribute), true).FirstOrDefault() is WebPageLinkAttribute unlockLink)
|
if (item.GetType().GetCustomAttributes(typeof(WebPageLinkAttribute), true).FirstOrDefault() is WebPageLinkAttribute unlockLink)
|
||||||
{
|
{
|
||||||
var detailsLink = new ThemedTextIconButton(unlockLink.ButtonName.Localize(), StaticData.Instance.LoadIcon("internet.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var detailsLink = new ThemedTextIconButton(unlockLink.ButtonName.Localize(), StaticData.Instance.LoadIcon("internet.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
BackgroundColor = theme.MinimalShade,
|
BackgroundColor = theme.MinimalShade,
|
||||||
ToolTipText = unlockLink.Url,
|
ToolTipText = unlockLink.Url,
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
var data = JsonConvert.DeserializeObject<List<LibraryLicense>>(StaticData.Instance.ReadAllText(Path.Combine("License", "license.json")));
|
var data = JsonConvert.DeserializeObject<List<LibraryLicense>>(StaticData.Instance.ReadAllText(Path.Combine("License", "license.json")));
|
||||||
|
|
||||||
var linkIcon = StaticData.Instance.LoadIcon("fa-link_16.png", 16, 16).SetToColor(theme.TextColor);
|
var linkIcon = StaticData.Instance.LoadIcon("fa-link_16.png", 16, 16).GrayToColor(theme.TextColor);
|
||||||
|
|
||||||
SectionWidget section = null;
|
SectionWidget section = null;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -99,12 +99,12 @@ namespace MatterHackers.MatterControl
|
||||||
}
|
}
|
||||||
|
|
||||||
var pulseImage = new ImageBuffer(borderImage);
|
var pulseImage = new ImageBuffer(borderImage);
|
||||||
var pulseWord = StaticData.Instance.LoadIcon("pulse_word.png").SetToColor(theme.TextColor);
|
var pulseWord = StaticData.Instance.LoadIcon("pulse_word.png").GrayToColor(theme.TextColor);
|
||||||
var wordWidth = bounds.Width * .8;
|
var wordWidth = bounds.Width * .8;
|
||||||
graphics = pulseImage.NewGraphics2D();
|
graphics = pulseImage.NewGraphics2D();
|
||||||
graphics.ImageRenderQuality = Graphics2D.TransformQuality.Best;
|
graphics.ImageRenderQuality = Graphics2D.TransformQuality.Best;
|
||||||
graphics.RenderMaxSize(pulseWord, new Vector2(pulseImage.Width / 2 - wordWidth / 2, margin), new Vector2(wordWidth, bounds.Height));
|
graphics.RenderMaxSize(pulseWord, new Vector2(pulseImage.Width / 2 - wordWidth / 2, margin), new Vector2(wordWidth, bounds.Height));
|
||||||
var pulseLogo = StaticData.Instance.LoadIcon("pulse_logo.png").SetToColor(theme.TextColor);
|
var pulseLogo = StaticData.Instance.LoadIcon("pulse_logo.png").GrayToColor(theme.TextColor);
|
||||||
var logoWidth = bounds.Width * .5;
|
var logoWidth = bounds.Width * .5;
|
||||||
graphics = pulseImage.NewGraphics2D();
|
graphics = pulseImage.NewGraphics2D();
|
||||||
graphics.ImageRenderQuality = Graphics2D.TransformQuality.Best;
|
graphics.ImageRenderQuality = Graphics2D.TransformQuality.Best;
|
||||||
|
|
@ -130,7 +130,7 @@ namespace MatterHackers.MatterControl
|
||||||
graphics = printerImage.NewGraphics2D();
|
graphics = printerImage.NewGraphics2D();
|
||||||
graphics.ImageRenderQuality = Graphics2D.TransformQuality.Best;
|
graphics.ImageRenderQuality = Graphics2D.TransformQuality.Best;
|
||||||
var imageWidth = bounds.Width * .8;
|
var imageWidth = bounds.Width * .8;
|
||||||
var printerIcon = StaticData.Instance.LoadIcon(iconFile).CropToVisible().SetToColor(theme.TextColor);
|
var printerIcon = StaticData.Instance.LoadIcon(iconFile).CropToVisible().GrayToColor(theme.TextColor);
|
||||||
var offset = pulseImage.Width / 2 - imageWidth / 2;
|
var offset = pulseImage.Width / 2 - imageWidth / 2;
|
||||||
graphics.RenderMaxSize(printerIcon, new Vector2(offset, offset), new Vector2(imageWidth, bounds.Height));
|
graphics.RenderMaxSize(printerIcon, new Vector2(offset, offset), new Vector2(imageWidth, bounds.Height));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
this.AddChild(new HorizontalSpacer());
|
this.AddChild(new HorizontalSpacer());
|
||||||
|
|
||||||
checkUpdateButton = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-refresh_14.png", 14, 14).SetToColor(theme.TextColor), theme)
|
checkUpdateButton = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-refresh_14.png", 14, 14).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
ToolTipText = "Check for Update".Localize(),
|
ToolTipText = "Check for Update".Localize(),
|
||||||
BackgroundColor = theme.MinimalShade,
|
BackgroundColor = theme.MinimalShade,
|
||||||
|
|
|
||||||
|
|
@ -115,9 +115,9 @@ namespace MatterHackers.MatterControl.PrintHistory
|
||||||
|
|
||||||
var size = (int)(buttonFontSize * GuiWidget.DeviceScale);
|
var size = (int)(buttonFontSize * GuiWidget.DeviceScale);
|
||||||
|
|
||||||
var star = StaticData.Instance.LoadIcon("star.png", size, size).SetToColor(theme.TextColor);
|
var star = StaticData.Instance.LoadIcon("star.png", size, size).GrayToColor(theme.TextColor);
|
||||||
var openStar = StaticData.Instance.LoadIcon("open_star.png", size, size).SetToColor(theme.TextColor);
|
var openStar = StaticData.Instance.LoadIcon("open_star.png", size, size).GrayToColor(theme.TextColor);
|
||||||
var failure = StaticData.Instance.LoadIcon("failure.png", size, size).SetToColor(theme.TextColor);
|
var failure = StaticData.Instance.LoadIcon("failure.png", size, size).GrayToColor(theme.TextColor);
|
||||||
|
|
||||||
content.AddChild(new GuiWidget(size, 1));
|
content.AddChild(new GuiWidget(size, 1));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
theme = AppContext.Theme;
|
theme = AppContext.Theme;
|
||||||
|
|
||||||
defaultIcon = StaticData.Instance.LoadIcon("mesh.png").SetToColor(theme.TextColor); //.AnyAlphaToColor(theme.PrimaryAccentColor);
|
defaultIcon = StaticData.Instance.LoadIcon("mesh.png").GrayToColor(theme.TextColor); //.AnyAlphaToColor(theme.PrimaryAccentColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
return defaultIcon;
|
return defaultIcon;
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ namespace MatterHackers.MatterControl.Library
|
||||||
{
|
{
|
||||||
return Task.FromResult(
|
return Task.FromResult(
|
||||||
StaticData.Instance.LoadIcon(
|
StaticData.Instance.LoadIcon(
|
||||||
Path.Combine((width > 50 || height > 50) ? "icon_sd_card_115x115.png" : "icon_sd_card_50x50.png")).SetToColor(ApplicationController.Instance.Theme.TextColor));
|
Path.Combine((width > 50 || height > 50) ? "icon_sd_card_115x115.png" : "icon_sd_card_50x50.png")).GrayToColor(ApplicationController.Instance.Theme.TextColor));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Load()
|
public override void Load()
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
// Must come before pathButton.Click definition
|
// Must come before pathButton.Click definition
|
||||||
RadioButton copyAndCalibrateOption = null;
|
RadioButton copyAndCalibrateOption = null;
|
||||||
|
|
||||||
var openButton = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-folder-open_16.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var openButton = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-folder-open_16.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
BackgroundColor = theme.MinimalShade,
|
BackgroundColor = theme.MinimalShade,
|
||||||
Margin = new BorderDouble(left: 8),
|
Margin = new BorderDouble(left: 8),
|
||||||
|
|
|
||||||
|
|
@ -55,8 +55,8 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
||||||
|
|
||||||
public ExpandCheckboxButton(string text, ThemeConfig theme, int pointSize = 11, bool expandable = true)
|
public ExpandCheckboxButton(string text, ThemeConfig theme, int pointSize = 11, bool expandable = true)
|
||||||
{
|
{
|
||||||
arrowRight = StaticData.Instance.LoadIcon("fa-angle-right_12.png", 12, 12).SetToColor(theme.TextColor);
|
arrowRight = StaticData.Instance.LoadIcon("fa-angle-right_12.png", 12, 12).GrayToColor(theme.TextColor);
|
||||||
arrowDown = StaticData.Instance.LoadIcon("fa-angle-down_12.png", 12, 12).SetToColor(theme.TextColor);
|
arrowDown = StaticData.Instance.LoadIcon("fa-angle-down_12.png", 12, 12).GrayToColor(theme.TextColor);
|
||||||
|
|
||||||
imageButton = new ThemedIconButton(arrowRight, theme)
|
imageButton = new ThemedIconButton(arrowRight, theme)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
Text = "Printers".Localize(),
|
Text = "Printers".Localize(),
|
||||||
HAnchor = HAnchor.Stretch,
|
HAnchor = HAnchor.Stretch,
|
||||||
AlwaysExpandable = true,
|
AlwaysExpandable = true,
|
||||||
Image = StaticData.Instance.LoadIcon("printer.png", 16, 16).SetToColor(theme.TextColor)
|
Image = StaticData.Instance.LoadIcon("printer.png", 16, 16).GrayToColor(theme.TextColor)
|
||||||
};
|
};
|
||||||
printersNode.TreeView = this;
|
printersNode.TreeView = this;
|
||||||
|
|
||||||
|
|
@ -74,7 +74,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
mainRow.AddChild(new HorizontalSpacer());
|
mainRow.AddChild(new HorizontalSpacer());
|
||||||
|
|
||||||
// add in the create pulse button
|
// add in the create pulse button
|
||||||
var createPulse = new ThemedIconButton(StaticData.Instance.LoadIcon("pulse_logo.png", 18, 18).SetToColor(theme.TextColor), theme)
|
var createPulse = new ThemedIconButton(StaticData.Instance.LoadIcon("pulse_logo.png", 18, 18).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Name = "Setup Pulse",
|
Name = "Setup Pulse",
|
||||||
VAnchor = VAnchor.Center,
|
VAnchor = VAnchor.Center,
|
||||||
|
|
@ -90,7 +90,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
mainRow.AddChild(createPulse);
|
mainRow.AddChild(createPulse);
|
||||||
|
|
||||||
// add in the create printer button
|
// add in the create printer button
|
||||||
var createPrinter = new ThemedIconButton(StaticData.Instance.LoadIcon("md-add-circle_18.png", 18, 18).SetToColor(theme.TextColor), theme)
|
var createPrinter = new ThemedIconButton(StaticData.Instance.LoadIcon("md-add-circle_18.png", 18, 18).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Name = "Create Printer",
|
Name = "Create Printer",
|
||||||
VAnchor = VAnchor.Center,
|
VAnchor = VAnchor.Center,
|
||||||
|
|
@ -106,7 +106,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
mainRow.AddChild(createPrinter);
|
mainRow.AddChild(createPrinter);
|
||||||
|
|
||||||
// add in the import printer button
|
// add in the import printer button
|
||||||
var importPrinter = new ThemedIconButton(StaticData.Instance.LoadIcon("md-import_18.png", 18, 18).SetToColor(theme.TextColor), theme)
|
var importPrinter = new ThemedIconButton(StaticData.Instance.LoadIcon("md-import_18.png", 18, 18).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
VAnchor = VAnchor.Center,
|
VAnchor = VAnchor.Center,
|
||||||
Margin = theme.ButtonSpacing,
|
Margin = theme.ButtonSpacing,
|
||||||
|
|
|
||||||
|
|
@ -224,7 +224,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
public static GuiWidget CreateSortingMenuButton(ThemeConfig theme, LibraryListView libraryView)
|
public static GuiWidget CreateSortingMenuButton(ThemeConfig theme, LibraryListView libraryView)
|
||||||
{
|
{
|
||||||
var viewOptionsButton = new PopupMenuButton(
|
var viewOptionsButton = new PopupMenuButton(
|
||||||
new ImageWidget(StaticData.Instance.LoadIcon("fa-sort_16.png", 32, 32).SetToColor(theme.TextColor)), theme)
|
new ImageWidget(StaticData.Instance.LoadIcon("fa-sort_16.png", 32, 32).GrayToColor(theme.TextColor)), theme)
|
||||||
{
|
{
|
||||||
AlignToRightEdge = true,
|
AlignToRightEdge = true,
|
||||||
Name = "Print Library View Options",
|
Name = "Print Library View Options",
|
||||||
|
|
@ -293,7 +293,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
Func<bool> containersShown)
|
Func<bool> containersShown)
|
||||||
{
|
{
|
||||||
var viewMenuButton = new PopupMenuButton(
|
var viewMenuButton = new PopupMenuButton(
|
||||||
new ImageWidget(StaticData.Instance.LoadIcon("mi-view-list_10.png", 32, 32).SetToColor(theme.TextColor))
|
new ImageWidget(StaticData.Instance.LoadIcon("mi-view-list_10.png", 32, 32).GrayToColor(theme.TextColor))
|
||||||
{
|
{
|
||||||
// VAnchor = VAnchor.Center
|
// VAnchor = VAnchor.Center
|
||||||
},
|
},
|
||||||
|
|
@ -574,7 +574,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
{
|
{
|
||||||
menuActions.Add(new LibraryAction(ActionScope.ListView)
|
menuActions.Add(new LibraryAction(ActionScope.ListView)
|
||||||
{
|
{
|
||||||
Icon = StaticData.Instance.LoadIcon("cube.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = StaticData.Instance.LoadIcon("cube.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
Title = "Add".Localize(),
|
Title = "Add".Localize(),
|
||||||
ToolTipText = "Add an.stl, .obj, .3mf, .amf, .gcode or.zip file to the Library".Localize(),
|
ToolTipText = "Add an.stl, .obj, .3mf, .amf, .gcode or.zip file to the Library".Localize(),
|
||||||
Action = (selectedLibraryItems, listView) =>
|
Action = (selectedLibraryItems, listView) =>
|
||||||
|
|
@ -602,7 +602,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
menuActions.Add(new LibraryAction(ActionScope.ListView)
|
menuActions.Add(new LibraryAction(ActionScope.ListView)
|
||||||
{
|
{
|
||||||
Title = "Create Folder".Localize() + "...",
|
Title = "Create Folder".Localize() + "...",
|
||||||
Icon = StaticData.Instance.LoadIcon("fa-folder-new_16.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = StaticData.Instance.LoadIcon("fa-folder-new_16.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
Action = (selectedLibraryItems, listView) =>
|
Action = (selectedLibraryItems, listView) =>
|
||||||
{
|
{
|
||||||
DialogWindow.Show(
|
DialogWindow.Show(
|
||||||
|
|
@ -634,7 +634,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
menuActions.Add(new LibraryAction(ActionScope.ListView)
|
menuActions.Add(new LibraryAction(ActionScope.ListView)
|
||||||
{
|
{
|
||||||
Title = "Enter Share Code".Localize() + "...",
|
Title = "Enter Share Code".Localize() + "...",
|
||||||
Icon = StaticData.Instance.LoadIcon("enter-code.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = StaticData.Instance.LoadIcon("enter-code.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
Action = (selectedLibraryItems, listView) =>
|
Action = (selectedLibraryItems, listView) =>
|
||||||
{
|
{
|
||||||
UiThread.RunOnIdle(() =>
|
UiThread.RunOnIdle(() =>
|
||||||
|
|
@ -712,7 +712,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
menuActions.Add(new LibraryAction(ActionScope.ListItem)
|
menuActions.Add(new LibraryAction(ActionScope.ListItem)
|
||||||
{
|
{
|
||||||
Title = "Open".Localize(),
|
Title = "Open".Localize(),
|
||||||
Icon = StaticData.Instance.LoadIcon("cube.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = StaticData.Instance.LoadIcon("cube.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
Action = (selectedLibraryItems, listView) =>
|
Action = (selectedLibraryItems, listView) =>
|
||||||
{
|
{
|
||||||
listView.SelectedItems.FirstOrDefault()?.OnDoubleClick(null);
|
listView.SelectedItems.FirstOrDefault()?.OnDoubleClick(null);
|
||||||
|
|
@ -746,7 +746,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
menuActions.Add(new LibraryAction(ActionScope.ListItem)
|
menuActions.Add(new LibraryAction(ActionScope.ListItem)
|
||||||
{
|
{
|
||||||
Title = "Open a copy".Localize(),
|
Title = "Open a copy".Localize(),
|
||||||
Icon = StaticData.Instance.LoadIcon("cube_add.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = StaticData.Instance.LoadIcon("cube_add.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
Action = (selectedLibraryItems, listView) =>
|
Action = (selectedLibraryItems, listView) =>
|
||||||
{
|
{
|
||||||
ApplicationController.Instance.OpenIntoNewTab(selectedLibraryItems);
|
ApplicationController.Instance.OpenIntoNewTab(selectedLibraryItems);
|
||||||
|
|
@ -771,7 +771,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
menuActions.Add(new LibraryAction(ActionScope.ListItem)
|
menuActions.Add(new LibraryAction(ActionScope.ListItem)
|
||||||
{
|
{
|
||||||
Title = "Add to Bed".Localize(),
|
Title = "Add to Bed".Localize(),
|
||||||
Icon = StaticData.Instance.LoadIcon("bed_add.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = StaticData.Instance.LoadIcon("bed_add.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
Action = async (selectedLibraryItems, listView) =>
|
Action = async (selectedLibraryItems, listView) =>
|
||||||
{
|
{
|
||||||
var activeContext = ApplicationController.Instance.DragDropData;
|
var activeContext = ApplicationController.Instance.DragDropData;
|
||||||
|
|
@ -827,7 +827,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
menuActions.Add(new LibraryAction(ActionScope.ListItem)
|
menuActions.Add(new LibraryAction(ActionScope.ListItem)
|
||||||
{
|
{
|
||||||
Title = "Export".Localize(),
|
Title = "Export".Localize(),
|
||||||
Icon = StaticData.Instance.LoadIcon("cube_export.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = StaticData.Instance.LoadIcon("cube_export.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
Action = (selectedLibraryItems, listView) =>
|
Action = (selectedLibraryItems, listView) =>
|
||||||
{
|
{
|
||||||
ApplicationController.Instance.ExportLibraryItems(libraryView.SelectedItems.Select(item => item.Model));
|
ApplicationController.Instance.ExportLibraryItems(libraryView.SelectedItems.Select(item => item.Model));
|
||||||
|
|
@ -844,7 +844,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
menuActions.Add(new LibraryAction(ActionScope.ListItem)
|
menuActions.Add(new LibraryAction(ActionScope.ListItem)
|
||||||
{
|
{
|
||||||
Title = "Share".Localize() + "...",
|
Title = "Share".Localize() + "...",
|
||||||
Icon = StaticData.Instance.LoadIcon("share.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = StaticData.Instance.LoadIcon("share.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
Action = (selectedLibraryItems, listView) =>
|
Action = (selectedLibraryItems, listView) =>
|
||||||
{
|
{
|
||||||
// Previously - shareFromLibraryButton_Click
|
// Previously - shareFromLibraryButton_Click
|
||||||
|
|
@ -868,7 +868,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
menuActions.Add(new LibraryAction(ActionScope.ListItem)
|
menuActions.Add(new LibraryAction(ActionScope.ListItem)
|
||||||
{
|
{
|
||||||
Title = "Rename".Localize(),
|
Title = "Rename".Localize(),
|
||||||
Icon = StaticData.Instance.LoadIcon("icon_edit.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = StaticData.Instance.LoadIcon("icon_edit.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
Action = (selectedLibraryItems, listView) =>
|
Action = (selectedLibraryItems, listView) =>
|
||||||
{
|
{
|
||||||
if (libraryView.SelectedItems.Count == 1)
|
if (libraryView.SelectedItems.Count == 1)
|
||||||
|
|
@ -972,7 +972,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
menuActions.Add(new LibraryAction(ActionScope.ListItem)
|
menuActions.Add(new LibraryAction(ActionScope.ListItem)
|
||||||
{
|
{
|
||||||
Title = "Remove".Localize(),
|
Title = "Remove".Localize(),
|
||||||
Icon = StaticData.Instance.LoadIcon("remove.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = StaticData.Instance.LoadIcon("remove.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
Action = (selectedLibraryItems, listView) =>
|
Action = (selectedLibraryItems, listView) =>
|
||||||
{
|
{
|
||||||
// Previously - deleteFromLibraryButton_Click
|
// Previously - deleteFromLibraryButton_Click
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
||||||
this.thumbWidth = width;
|
this.thumbWidth = width;
|
||||||
this.thumbHeight = height;
|
this.thumbHeight = height;
|
||||||
|
|
||||||
overflowIcon = StaticData.Instance.LoadIcon(Path.Combine("ViewTransformControls", "overflow.png"), 32, 32).SetToColor(theme.TextColor);
|
overflowIcon = StaticData.Instance.LoadIcon(Path.Combine("ViewTransformControls", "overflow.png"), 32, 32).GrayToColor(theme.TextColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool HasMenu { get; set; } = false;
|
public bool HasMenu { get; set; } = false;
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
allControls.AddChild(navBar);
|
allControls.AddChild(navBar);
|
||||||
theme.ApplyBottomBorder(navBar);
|
theme.ApplyBottomBorder(navBar);
|
||||||
|
|
||||||
var toolbar = new OverflowBar(StaticData.Instance.LoadIcon("fa-sort_16.png", 32, 32).SetToColor(theme.TextColor), theme)
|
var toolbar = new OverflowBar(StaticData.Instance.LoadIcon("fa-sort_16.png", 32, 32).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
HAnchor = HAnchor.Stretch,
|
HAnchor = HAnchor.Stretch,
|
||||||
VAnchor = VAnchor.Fit,
|
VAnchor = VAnchor.Fit,
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ namespace MatterHackers.MatterControl.Library.Widgets
|
||||||
this.theme = theme;
|
this.theme = theme;
|
||||||
this.TreeLoaded = false;
|
this.TreeLoaded = false;
|
||||||
|
|
||||||
var searchIcon = StaticData.Instance.LoadIcon("icon_search_24x24.png", 16, 16).SetToColor(theme.TextColor).AjustAlpha(0.3);
|
var searchIcon = StaticData.Instance.LoadIcon("icon_search_24x24.png", 16, 16).GrayToColor(theme.TextColor).AjustAlpha(0.3);
|
||||||
|
|
||||||
searchBox = new TextEditWithInlineCancel(theme)
|
searchBox = new TextEditWithInlineCancel(theme)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -187,8 +187,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
favoritesBar.VerticalScrollBar.Show = ScrollBar.ShowState.Never;
|
favoritesBar.VerticalScrollBar.Show = ScrollBar.ShowState.Never;
|
||||||
|
|
||||||
var expandedImage = StaticData.Instance.LoadIcon("expand.png", 16, 16).SetToColor(theme.TextColor);
|
var expandedImage = StaticData.Instance.LoadIcon("expand.png", 16, 16).GrayToColor(theme.TextColor);
|
||||||
var collapsedImage = StaticData.Instance.LoadIcon("collapse.png", 16, 16).SetToColor(theme.TextColor);
|
var collapsedImage = StaticData.Instance.LoadIcon("collapse.png", 16, 16).GrayToColor(theme.TextColor);
|
||||||
|
|
||||||
var expandBarButton = new ThemedIconButton(expanded ? collapsedImage : expandedImage, theme)
|
var expandBarButton = new ThemedIconButton(expanded ? collapsedImage : expandedImage, theme)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
var buttonGroup = new ObservableCollection<GuiWidget>();
|
var buttonGroup = new ObservableCollection<GuiWidget>();
|
||||||
|
|
||||||
speedsButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon("speeds.png", 16, 16).SetToColor(theme.TextColor), theme)
|
speedsButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon("speeds.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
SiblingRadioButtonList = buttonGroup,
|
SiblingRadioButtonList = buttonGroup,
|
||||||
Name = "Speeds Button",
|
Name = "Speeds Button",
|
||||||
|
|
@ -74,7 +74,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
buttonPanel.AddChild(speedsButton);
|
buttonPanel.AddChild(speedsButton);
|
||||||
|
|
||||||
materialsButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon("materials.png", 16, 16).SetToColor(theme.TextColor), theme)
|
materialsButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon("materials.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
SiblingRadioButtonList = buttonGroup,
|
SiblingRadioButtonList = buttonGroup,
|
||||||
Name = "Materials Button",
|
Name = "Materials Button",
|
||||||
|
|
@ -87,7 +87,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
buttonPanel.AddChild(materialsButton);
|
buttonPanel.AddChild(materialsButton);
|
||||||
|
|
||||||
noColorButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon("no-color.png", 16, 16).SetToColor(theme.TextColor), theme)
|
noColorButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon("no-color.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
SiblingRadioButtonList = buttonGroup,
|
SiblingRadioButtonList = buttonGroup,
|
||||||
Name = "No Color Button",
|
Name = "No Color Button",
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
if (getPickedColor != null)
|
if (getPickedColor != null)
|
||||||
{
|
{
|
||||||
var selectButton = rightContent.AddChild(new ThemedTextIconButton("Select".Localize(), StaticData.Instance.LoadIcon("eye_dropper.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var selectButton = rightContent.AddChild(new ThemedTextIconButton("Select".Localize(), StaticData.Instance.LoadIcon("eye_dropper.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Margin = 0,
|
Margin = 0,
|
||||||
HAnchor = HAnchor.Fit | HAnchor.Left,
|
HAnchor = HAnchor.Fit | HAnchor.Left,
|
||||||
|
|
|
||||||
|
|
@ -855,7 +855,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
};
|
};
|
||||||
moveButtons.AddChild(textWidget);
|
moveButtons.AddChild(textWidget);
|
||||||
var buttonSize = 24 * DeviceScale;
|
var buttonSize = 24 * DeviceScale;
|
||||||
var moveLeftButton = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-angle-right_12.png", 14, 14).SetToColor(theme.TextColor).MirrorX(), theme)
|
var moveLeftButton = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-angle-right_12.png", 14, 14).GrayToColor(theme.TextColor).MirrorX(), theme)
|
||||||
{
|
{
|
||||||
Width = buttonSize,
|
Width = buttonSize,
|
||||||
Height = buttonSize,
|
Height = buttonSize,
|
||||||
|
|
@ -871,7 +871,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
};
|
};
|
||||||
moveButtons.AddChild(moveLeftButton);
|
moveButtons.AddChild(moveLeftButton);
|
||||||
|
|
||||||
var moveRightButton = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-angle-right_12.png", 14, 14).SetToColor(theme.TextColor), theme)
|
var moveRightButton = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-angle-right_12.png", 14, 14).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Width = buttonSize,
|
Width = buttonSize,
|
||||||
Height = buttonSize,
|
Height = buttonSize,
|
||||||
|
|
@ -989,7 +989,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
tabControl,
|
tabControl,
|
||||||
new DesignTabPage(workspace, theme, ""),
|
new DesignTabPage(workspace, theme, ""),
|
||||||
theme,
|
theme,
|
||||||
StaticData.Instance.LoadIcon("cube.png", 16, 16).SetToColor(theme.TextColor))
|
StaticData.Instance.LoadIcon("cube.png", 16, 16).GrayToColor(theme.TextColor))
|
||||||
{
|
{
|
||||||
Name = "newPart" + tabControl.AllTabs.Count(),
|
Name = "newPart" + tabControl.AllTabs.Count(),
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -680,7 +680,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
// add in the move up button
|
// add in the move up button
|
||||||
var babyStepAmount = .02;
|
var babyStepAmount = .02;
|
||||||
var upButton = babySteppingControls.AddChild(new ThemedIconButton(StaticData.Instance.LoadIcon("Up Arrow.png", 32, 32).SetToColor(theme.TextColor), theme)
|
var upButton = babySteppingControls.AddChild(new ThemedIconButton(StaticData.Instance.LoadIcon("Up Arrow.png", 32, 32).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
HAnchor = HAnchor.Center,
|
HAnchor = HAnchor.Center,
|
||||||
VAnchor = VAnchor.Absolute,
|
VAnchor = VAnchor.Absolute,
|
||||||
|
|
@ -719,7 +719,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
});
|
});
|
||||||
|
|
||||||
// add in the move down button
|
// add in the move down button
|
||||||
var downButton = babySteppingControls.AddChild(new ThemedIconButton(StaticData.Instance.LoadIcon("Down Arrow.png", 32, 32).SetToColor(theme.TextColor), theme)
|
var downButton = babySteppingControls.AddChild(new ThemedIconButton(StaticData.Instance.LoadIcon("Down Arrow.png", 32, 32).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
HAnchor = HAnchor.Center,
|
HAnchor = HAnchor.Center,
|
||||||
VAnchor = VAnchor.Absolute,
|
VAnchor = VAnchor.Absolute,
|
||||||
|
|
@ -890,7 +890,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
timeContainer.AddChild(new ImageWidget(StaticData.Instance.LoadIcon("fa-clock_24.png", 24, 24).SetToColor(theme.TextColor))
|
timeContainer.AddChild(new ImageWidget(StaticData.Instance.LoadIcon("fa-clock_24.png", 24, 24).GrayToColor(theme.TextColor))
|
||||||
{
|
{
|
||||||
VAnchor = VAnchor.Center
|
VAnchor = VAnchor.Center
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(buttonText))
|
if (string.IsNullOrEmpty(buttonText))
|
||||||
{
|
{
|
||||||
return new ThemedIconButton(StaticData.Instance.LoadIcon(iconFilename, 12, 12).SetToColor(theme.TextColor), theme)
|
return new ThemedIconButton(StaticData.Instance.LoadIcon(iconFilename, 12, 12).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Margin = theme.ButtonSpacing,
|
Margin = theme.ButtonSpacing,
|
||||||
Enabled = clickAction != null,
|
Enabled = clickAction != null,
|
||||||
|
|
@ -239,7 +239,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
{
|
{
|
||||||
var oldSize = theme.DefaultFontSize;
|
var oldSize = theme.DefaultFontSize;
|
||||||
theme.DefaultFontSize = 8;
|
theme.DefaultFontSize = 8;
|
||||||
var pauseButton = new ThemedTextIconButton(buttonText, StaticData.Instance.LoadIcon(iconFilename, 12, 12).SetToColor(theme.TextColor), theme)
|
var pauseButton = new ThemedTextIconButton(buttonText, StaticData.Instance.LoadIcon(iconFilename, 12, 12).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Margin = new BorderDouble(marginX, 0),
|
Margin = new BorderDouble(marginX, 0),
|
||||||
Padding = new BorderDouble(7, 3),
|
Padding = new BorderDouble(7, 3),
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
this.taskDetails = taskDetails;
|
this.taskDetails = taskDetails;
|
||||||
this.Padding = new BorderDouble(3, 0);
|
this.Padding = new BorderDouble(3, 0);
|
||||||
|
|
||||||
this.AddChild(new ImageWidget(StaticData.Instance.LoadIcon("wait.png", 14, 14).SetToColor(theme.TextColor))
|
this.AddChild(new ImageWidget(StaticData.Instance.LoadIcon("wait.png", 14, 14).GrayToColor(theme.TextColor))
|
||||||
{
|
{
|
||||||
VAnchor = VAnchor.Center,
|
VAnchor = VAnchor.Center,
|
||||||
HAnchor = HAnchor.Left
|
HAnchor = HAnchor.Left
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
contentRow.AddChild(itemNameWidget);
|
contentRow.AddChild(itemNameWidget);
|
||||||
|
|
||||||
var icon = StaticData.Instance.LoadIcon("fa-folder-new_16.png", 16, 16).SetToColor(ApplicationController.Instance.MenuTheme.TextColor);
|
var icon = StaticData.Instance.LoadIcon("fa-folder-new_16.png", 16, 16).GrayToColor(ApplicationController.Instance.MenuTheme.TextColor);
|
||||||
var isEnabled = false;
|
var isEnabled = false;
|
||||||
if (librarySelectorWidget.ActiveContainer is ILibraryWritableContainer writableContainer)
|
if (librarySelectorWidget.ActiveContainer is ILibraryWritableContainer writableContainer)
|
||||||
{
|
{
|
||||||
|
|
@ -130,7 +130,7 @@ namespace MatterHackers.MatterControl
|
||||||
createFolderButton.Name = "Create Folder In Button";
|
createFolderButton.Name = "Create Folder In Button";
|
||||||
folderButtonRow.AddChild(createFolderButton);
|
folderButtonRow.AddChild(createFolderButton);
|
||||||
|
|
||||||
var refreshButton = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-refresh_14.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var refreshButton = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-refresh_14.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
ToolTipText = "Refresh Folder".Localize(),
|
ToolTipText = "Refresh Folder".Localize(),
|
||||||
Enabled = isEnabled,
|
Enabled = isEnabled,
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
toolbar.AddChild(primaryActionsPanel);
|
toolbar.AddChild(primaryActionsPanel);
|
||||||
|
|
||||||
// put in a make permanent button
|
// put in a make permanent button
|
||||||
var icon = StaticData.Instance.LoadIcon("apply.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply();
|
var icon = StaticData.Instance.LoadIcon("apply.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply();
|
||||||
applyButton = new ThemedIconButton(icon, theme)
|
applyButton = new ThemedIconButton(icon, theme)
|
||||||
{
|
{
|
||||||
Margin = theme.ButtonSpacing,
|
Margin = theme.ButtonSpacing,
|
||||||
|
|
@ -115,7 +115,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
toolbar.AddChild(applyButton);
|
toolbar.AddChild(applyButton);
|
||||||
|
|
||||||
// put in a remove button
|
// put in a remove button
|
||||||
cancelButton = new ThemedIconButton(StaticData.Instance.LoadIcon("cancel.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(), theme)
|
cancelButton = new ThemedIconButton(StaticData.Instance.LoadIcon("cancel.png", 16, 16).GrayToColor(theme.TextColor).SetPreMultiply(), theme)
|
||||||
{
|
{
|
||||||
Margin = theme.ButtonSpacing,
|
Margin = theme.ButtonSpacing,
|
||||||
ToolTipText = "Cancel".Localize(),
|
ToolTipText = "Cancel".Localize(),
|
||||||
|
|
|
||||||
|
|
@ -306,7 +306,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
this.TabBar.ActionArea.AddChild(tabTrailer);
|
this.TabBar.ActionArea.AddChild(tabTrailer);
|
||||||
|
|
||||||
var plusTabButton = new NewTabButton(StaticData.Instance.LoadIcon("fa-plus_12.png", 12, 12).SetToColor(theme.TextColor), theme)
|
var plusTabButton = new NewTabButton(StaticData.Instance.LoadIcon("fa-plus_12.png", 12, 12).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Height = 20 * GuiWidget.DeviceScale,
|
Height = 20 * GuiWidget.DeviceScale,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -206,7 +206,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
private static ImageBuffer CreateOverflowIcon(ThemeConfig theme)
|
private static ImageBuffer CreateOverflowIcon(ThemeConfig theme)
|
||||||
{
|
{
|
||||||
return StaticData.Instance.LoadIcon(Path.Combine("ViewTransformControls", "overflow.png"), 32, 32).SetToColor(theme.TextColor);
|
return StaticData.Instance.LoadIcon(Path.Combine("ViewTransformControls", "overflow.png"), 32, 32).GrayToColor(theme.TextColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
this.CloseMenu();
|
this.CloseMenu();
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
Icon = StaticData.Instance.LoadIcon("cube_export.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = StaticData.Instance.LoadIcon("cube_export.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
ButtonEnabled = exportPlugin.Enabled,
|
ButtonEnabled = exportPlugin.Enabled,
|
||||||
ButtonName = "Export GCode Button",
|
ButtonName = "Export GCode Button",
|
||||||
ButtonAction = (widget) =>
|
ButtonAction = (widget) =>
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
{
|
{
|
||||||
var resetConnectionButton = new ThemedTextIconButton(
|
var resetConnectionButton = new ThemedTextIconButton(
|
||||||
"Reset".Localize(),
|
"Reset".Localize(),
|
||||||
StaticData.Instance.LoadIcon("e_stop.png", 14, 14).SetToColor(theme.TextColor),
|
StaticData.Instance.LoadIcon("e_stop.png", 14, 14).GrayToColor(theme.TextColor),
|
||||||
theme)
|
theme)
|
||||||
{
|
{
|
||||||
ToolTipText = "Reboots the firmware on the controller".Localize(),
|
ToolTipText = "Reboots the firmware on the controller".Localize(),
|
||||||
|
|
@ -154,7 +154,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
var buttonGroupB = new ObservableCollection<GuiWidget>();
|
var buttonGroupB = new ObservableCollection<GuiWidget>();
|
||||||
|
|
||||||
var iconPath = Path.Combine("ViewTransformControls", "model.png");
|
var iconPath = Path.Combine("ViewTransformControls", "model.png");
|
||||||
modelViewButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon(iconPath, 16, 16).SetToColor(theme.TextColor), theme)
|
modelViewButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon(iconPath, 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
SiblingRadioButtonList = buttonGroupB,
|
SiblingRadioButtonList = buttonGroupB,
|
||||||
Name = "Model View Button",
|
Name = "Model View Button",
|
||||||
|
|
@ -170,7 +170,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
viewModes.Add(PartViewMode.Model, modelViewButton);
|
viewModes.Add(PartViewMode.Model, modelViewButton);
|
||||||
|
|
||||||
iconPath = Path.Combine("ViewTransformControls", "gcode_3d.png");
|
iconPath = Path.Combine("ViewTransformControls", "gcode_3d.png");
|
||||||
layers3DButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon(iconPath, 16, 16).SetToColor(theme.TextColor), theme)
|
layers3DButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon(iconPath, 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
SiblingRadioButtonList = buttonGroupB,
|
SiblingRadioButtonList = buttonGroupB,
|
||||||
Name = "Layers3D Button",
|
Name = "Layers3D Button",
|
||||||
|
|
@ -187,7 +187,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
this.AddChild(layers3DButton);
|
this.AddChild(layers3DButton);
|
||||||
|
|
||||||
iconPath = Path.Combine("ViewTransformControls", "gcode_2d.png");
|
iconPath = Path.Combine("ViewTransformControls", "gcode_2d.png");
|
||||||
layers2DButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon(iconPath, 16, 16).SetToColor(theme.TextColor), theme)
|
layers2DButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon(iconPath, 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
SiblingRadioButtonList = buttonGroupB,
|
SiblingRadioButtonList = buttonGroupB,
|
||||||
Name = "Layers2D Button",
|
Name = "Layers2D Button",
|
||||||
|
|
@ -310,7 +310,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
{
|
{
|
||||||
new NamedAction()
|
new NamedAction()
|
||||||
{
|
{
|
||||||
Icon = StaticData.Instance.LoadIcon("memory_16x16.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = StaticData.Instance.LoadIcon("memory_16x16.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
Title = "Configure EEProm".Localize(),
|
Title = "Configure EEProm".Localize(),
|
||||||
Action = configureEePromButton_Click,
|
Action = configureEePromButton_Click,
|
||||||
IsEnabled = () => printer.Connection.IsConnected
|
IsEnabled = () => printer.Connection.IsConnected
|
||||||
|
|
@ -389,7 +389,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
{
|
{
|
||||||
ApplicationController.Instance.ExportAsMatterControlConfig(printer);
|
ApplicationController.Instance.ExportAsMatterControlConfig(printer);
|
||||||
}),
|
}),
|
||||||
Icon = StaticData.Instance.LoadIcon("cube_export.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = StaticData.Instance.LoadIcon("cube_export.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
});
|
});
|
||||||
menuActions.Add(new ActionSeparator());
|
menuActions.Add(new ActionSeparator());
|
||||||
menuActions.Add(new NamedAction()
|
menuActions.Add(new NamedAction()
|
||||||
|
|
@ -402,7 +402,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
DialogWindow.Show(new PrinterCalibrationWizard(printer, theme));
|
DialogWindow.Show(new PrinterCalibrationWizard(printer, theme));
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
Icon = StaticData.Instance.LoadIcon("compass.png", 16, 16).SetToColor(theme.TextColor)
|
Icon = StaticData.Instance.LoadIcon("compass.png", 16, 16).GrayToColor(theme.TextColor)
|
||||||
});
|
});
|
||||||
menuActions.Add(new ActionSeparator());
|
menuActions.Add(new ActionSeparator());
|
||||||
menuActions.Add(new NamedAction()
|
menuActions.Add(new NamedAction()
|
||||||
|
|
@ -412,7 +412,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
{
|
{
|
||||||
DialogWindow.Show(new UpdateSettingsPage(printer));
|
DialogWindow.Show(new UpdateSettingsPage(printer));
|
||||||
},
|
},
|
||||||
Icon = StaticData.Instance.LoadIcon("fa-refresh_14.png", 16, 16).SetToColor(theme.TextColor)
|
Icon = StaticData.Instance.LoadIcon("fa-refresh_14.png", 16, 16).GrayToColor(theme.TextColor)
|
||||||
});
|
});
|
||||||
menuActions.Add(new NamedAction()
|
menuActions.Add(new NamedAction()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ namespace MatterHackers.MatterControl.ActionBar
|
||||||
|
|
||||||
connectButton = new ThemedTextIconButton(
|
connectButton = new ThemedTextIconButton(
|
||||||
"Connect".Localize(),
|
"Connect".Localize(),
|
||||||
StaticData.Instance.LoadIcon("connect.png", 14, 14).SetToColor(theme.TextColor),
|
StaticData.Instance.LoadIcon("connect.png", 14, 14).GrayToColor(theme.TextColor),
|
||||||
theme)
|
theme)
|
||||||
{
|
{
|
||||||
Name = "Connect to printer button",
|
Name = "Connect to printer button",
|
||||||
|
|
@ -77,7 +77,7 @@ namespace MatterHackers.MatterControl.ActionBar
|
||||||
// add the cancel stop button
|
// add the cancel stop button
|
||||||
cancelConnectButton = new ThemedTextIconButton(
|
cancelConnectButton = new ThemedTextIconButton(
|
||||||
"Cancel".Localize(),
|
"Cancel".Localize(),
|
||||||
StaticData.Instance.LoadIcon("connect.png", 14, 14).SetToColor(theme.TextColor),
|
StaticData.Instance.LoadIcon("connect.png", 14, 14).GrayToColor(theme.TextColor),
|
||||||
theme)
|
theme)
|
||||||
{
|
{
|
||||||
ToolTipText = "Stop trying to connect to the printer.".Localize(),
|
ToolTipText = "Stop trying to connect to the printer.".Localize(),
|
||||||
|
|
@ -94,7 +94,7 @@ namespace MatterHackers.MatterControl.ActionBar
|
||||||
|
|
||||||
disconnectButton = new ThemedTextIconButton(
|
disconnectButton = new ThemedTextIconButton(
|
||||||
"Disconnect".Localize(),
|
"Disconnect".Localize(),
|
||||||
StaticData.Instance.LoadIcon("connect.png", 14, 14).SetToColor(theme.TextColor),
|
StaticData.Instance.LoadIcon("connect.png", 14, 14).GrayToColor(theme.TextColor),
|
||||||
theme)
|
theme)
|
||||||
{
|
{
|
||||||
Name = "Disconnect from printer button",
|
Name = "Disconnect from printer button",
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
this.VAnchor = VAnchor.Fit | VAnchor;
|
this.VAnchor = VAnchor.Fit | VAnchor;
|
||||||
this.BackgroundColor = theme.ResolveColor(theme.BackgroundColor, theme.PrimaryAccentColor.WithAlpha(30));
|
this.BackgroundColor = theme.ResolveColor(theme.BackgroundColor, theme.PrimaryAccentColor.WithAlpha(30));
|
||||||
|
|
||||||
var errorImage = StaticData.Instance.LoadIcon("SettingsGroupError_16x.png", 16, 16).SetToColor(theme.TextColor);
|
var errorImage = StaticData.Instance.LoadIcon("SettingsGroupError_16x.png", 16, 16).GrayToColor(theme.TextColor);
|
||||||
var warningImage = StaticData.Instance.LoadIcon("SettingsGroupWarning_16x.png", 16, 16).SetToColor(theme.TextColor);
|
var warningImage = StaticData.Instance.LoadIcon("SettingsGroupWarning_16x.png", 16, 16).GrayToColor(theme.TextColor);
|
||||||
var infoImage = StaticData.Instance.LoadIcon("StatusInfoTip_16x.png", 16, 16);
|
var infoImage = StaticData.Instance.LoadIcon("StatusInfoTip_16x.png", 16, 16);
|
||||||
|
|
||||||
foreach (var validationError in errors.OrderByDescending(e => e.ErrorLevel))
|
foreach (var validationError in errors.OrderByDescending(e => e.ErrorLevel))
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
titleAndTreeView.AddChild(treeView);
|
titleAndTreeView.AddChild(treeView);
|
||||||
|
|
||||||
workspaceName.ActionArea.AddChild(
|
workspaceName.ActionArea.AddChild(
|
||||||
new ThemedIconButton(StaticData.Instance.LoadIcon("fa-angle-right_12.png", 12, 12).SetToColor(theme.TextColor), theme)
|
new ThemedIconButton(StaticData.Instance.LoadIcon("fa-angle-right_12.png", 12, 12).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Enabled = false
|
Enabled = false
|
||||||
},
|
},
|
||||||
|
|
@ -356,7 +356,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
// add the view controls
|
// add the view controls
|
||||||
var buttonGroupA = new ObservableCollection<GuiWidget>();
|
var buttonGroupA = new ObservableCollection<GuiWidget>();
|
||||||
partSelectButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon(Path.Combine("ViewTransformControls", "partSelect.png"), 16, 16).SetToColor(theme.TextColor), theme)
|
partSelectButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon(Path.Combine("ViewTransformControls", "partSelect.png"), 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
SiblingRadioButtonList = buttonGroupA,
|
SiblingRadioButtonList = buttonGroupA,
|
||||||
ToolTipText = "Select Parts".Localize(),
|
ToolTipText = "Select Parts".Localize(),
|
||||||
|
|
@ -368,7 +368,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
partSelectButton.Click += (s, e) => viewControls3D.ActiveButton = ViewControls3DButtons.PartSelect;
|
partSelectButton.Click += (s, e) => viewControls3D.ActiveButton = ViewControls3DButtons.PartSelect;
|
||||||
buttonGroupA.Add(partSelectButton);
|
buttonGroupA.Add(partSelectButton);
|
||||||
|
|
||||||
rotateButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon(Path.Combine("ViewTransformControls", "rotate.png"), 16, 16).SetToColor(theme.TextColor), theme)
|
rotateButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon(Path.Combine("ViewTransformControls", "rotate.png"), 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
SiblingRadioButtonList = buttonGroupA,
|
SiblingRadioButtonList = buttonGroupA,
|
||||||
ToolTipText = "Rotate View".Localize(),
|
ToolTipText = "Rotate View".Localize(),
|
||||||
|
|
@ -379,7 +379,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
rotateButton.Click += (s, e) => viewControls3D.ActiveButton = ViewControls3DButtons.Rotate;
|
rotateButton.Click += (s, e) => viewControls3D.ActiveButton = ViewControls3DButtons.Rotate;
|
||||||
buttonGroupA.Add(rotateButton);
|
buttonGroupA.Add(rotateButton);
|
||||||
|
|
||||||
translateButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon(Path.Combine("ViewTransformControls", "translate.png"), 16, 16).SetToColor(theme.TextColor), theme)
|
translateButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon(Path.Combine("ViewTransformControls", "translate.png"), 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
SiblingRadioButtonList = buttonGroupA,
|
SiblingRadioButtonList = buttonGroupA,
|
||||||
ToolTipText = "Move View".Localize(),
|
ToolTipText = "Move View".Localize(),
|
||||||
|
|
@ -390,7 +390,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
translateButton.Click += (s, e) => viewControls3D.ActiveButton = ViewControls3DButtons.Translate;
|
translateButton.Click += (s, e) => viewControls3D.ActiveButton = ViewControls3DButtons.Translate;
|
||||||
buttonGroupA.Add(translateButton);
|
buttonGroupA.Add(translateButton);
|
||||||
|
|
||||||
zoomButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon(Path.Combine("ViewTransformControls", "scale.png"), 16, 16).SetToColor(theme.TextColor), theme)
|
zoomButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon(Path.Combine("ViewTransformControls", "scale.png"), 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
SiblingRadioButtonList = buttonGroupA,
|
SiblingRadioButtonList = buttonGroupA,
|
||||||
ToolTipText = "Zoom View".Localize(),
|
ToolTipText = "Zoom View".Localize(),
|
||||||
|
|
@ -462,7 +462,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
};
|
};
|
||||||
|
|
||||||
// add the home button
|
// add the home button
|
||||||
var homeButton = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-home_16.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var homeButton = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-home_16.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
ToolTipText = "Reset View".Localize(),
|
ToolTipText = "Reset View".Localize(),
|
||||||
Margin = theme.ButtonSpacing
|
Margin = theme.ButtonSpacing
|
||||||
|
|
@ -470,7 +470,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
homeButton.MouseEnterBounds += (s1, e1) => homeButton.SetActiveUiHint("W Key");
|
homeButton.MouseEnterBounds += (s1, e1) => homeButton.SetActiveUiHint("W Key");
|
||||||
AddRoundButton(homeButton, RotatedMargin(homeButton, MathHelper.Tau * .3)).Click += (s, e) => viewControls3D.NotifyResetView();
|
AddRoundButton(homeButton, RotatedMargin(homeButton, MathHelper.Tau * .3)).Click += (s, e) => viewControls3D.NotifyResetView();
|
||||||
|
|
||||||
var zoomToSelectionButton = new ThemedIconButton(StaticData.Instance.LoadIcon("select.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var zoomToSelectionButton = new ThemedIconButton(StaticData.Instance.LoadIcon("select.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Name = "Zoom to selection button",
|
Name = "Zoom to selection button",
|
||||||
ToolTipText = "Zoom to Selection".Localize(),
|
ToolTipText = "Zoom to Selection".Localize(),
|
||||||
|
|
@ -491,7 +491,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
var turntableEnabled = UserSettings.Instance.get(UserSettingsKey.TurntableMode) != "False";
|
var turntableEnabled = UserSettings.Instance.get(UserSettingsKey.TurntableMode) != "False";
|
||||||
TrackballTumbleWidget.TurntableEnabled = turntableEnabled;
|
TrackballTumbleWidget.TurntableEnabled = turntableEnabled;
|
||||||
|
|
||||||
var turnTableButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon("spin.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var turnTableButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon("spin.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
ToolTipText = "Turntable Mode".Localize(),
|
ToolTipText = "Turntable Mode".Localize(),
|
||||||
Margin = theme.ButtonSpacing,
|
Margin = theme.ButtonSpacing,
|
||||||
|
|
@ -518,7 +518,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
var perspectiveEnabled = UserSettings.Instance.get(UserSettingsKey.PerspectiveMode) != false.ToString();
|
var perspectiveEnabled = UserSettings.Instance.get(UserSettingsKey.PerspectiveMode) != false.ToString();
|
||||||
TrackballTumbleWidget.ChangeProjectionMode(perspectiveEnabled, false);
|
TrackballTumbleWidget.ChangeProjectionMode(perspectiveEnabled, false);
|
||||||
var projectionButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon("perspective.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var projectionButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon("perspective.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Name = "Projection mode button",
|
Name = "Projection mode button",
|
||||||
ToolTipText = "Perspective Mode".Localize(),
|
ToolTipText = "Perspective Mode".Localize(),
|
||||||
|
|
@ -548,7 +548,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
cubeCenterFromRightTop.X -= bottomButtonOffset;
|
cubeCenterFromRightTop.X -= bottomButtonOffset;
|
||||||
|
|
||||||
// put in the bed and build volume buttons
|
// put in the bed and build volume buttons
|
||||||
var bedButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon("bed.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var bedButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon("bed.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Name = "Bed Button",
|
Name = "Bed Button",
|
||||||
ToolTipText = "Show Print Bed".Localize(),
|
ToolTipText = "Show Print Bed".Localize(),
|
||||||
|
|
@ -559,7 +559,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
bedButton.MouseEnterBounds += (s, e) => bedButton.SetActiveUiHint("Hide and show the bed".Localize());
|
bedButton.MouseEnterBounds += (s, e) => bedButton.SetActiveUiHint("Hide and show the bed".Localize());
|
||||||
|
|
||||||
AddRoundButton(bedButton, new Vector2((cubeCenterFromRightTop.X + 18 * scale - bedButton.Width / 2) / scale, startHeight));
|
AddRoundButton(bedButton, new Vector2((cubeCenterFromRightTop.X + 18 * scale - bedButton.Width / 2) / scale, startHeight));
|
||||||
var printAreaButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon("print_area.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var printAreaButton = new ThemedRadioIconButton(StaticData.Instance.LoadIcon("print_area.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Name = "Bed Button",
|
Name = "Bed Button",
|
||||||
ToolTipText = BuildHeightValid() ? "Show Print Area".Localize() : "Define printer build height to enable",
|
ToolTipText = BuildHeightValid() ? "Show Print Area".Localize() : "Define printer build height to enable",
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
this.AddChild(new ToolbarSeparator(theme.GetBorderColor(50), theme.SeparatorMargin));
|
this.AddChild(new ToolbarSeparator(theme.GetBorderColor(50), theme.SeparatorMargin));
|
||||||
|
|
||||||
bedMenuButton = new PopupMenuButton("Bed".Localize(), StaticData.Instance.LoadIcon("bed.png", 16, 16).SetToColor(theme.TextColor), theme)
|
bedMenuButton = new PopupMenuButton("Bed".Localize(), StaticData.Instance.LoadIcon("bed.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Name = "Bed Options Menu",
|
Name = "Bed Options Menu",
|
||||||
Enabled = true,
|
Enabled = true,
|
||||||
|
|
@ -123,7 +123,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
this.AddChild(new ToolbarSeparator(theme.GetBorderColor(50), theme.SeparatorMargin));
|
this.AddChild(new ToolbarSeparator(theme.GetBorderColor(50), theme.SeparatorMargin));
|
||||||
|
|
||||||
undoButton = new ThemedIconButton(StaticData.Instance.LoadIcon("undo.png", 16, 16).SetToColor(theme.TextColor), theme)
|
undoButton = new ThemedIconButton(StaticData.Instance.LoadIcon("undo.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Name = "3D View Undo",
|
Name = "3D View Undo",
|
||||||
ToolTipText = "Undo".Localize(),
|
ToolTipText = "Undo".Localize(),
|
||||||
|
|
@ -139,7 +139,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
};
|
};
|
||||||
this.AddChild(undoButton);
|
this.AddChild(undoButton);
|
||||||
|
|
||||||
redoButton = new ThemedIconButton(StaticData.Instance.LoadIcon("redo.png", 16, 16).SetToColor(theme.TextColor), theme)
|
redoButton = new ThemedIconButton(StaticData.Instance.LoadIcon("redo.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Name = "3D View Redo",
|
Name = "3D View Redo",
|
||||||
Margin = theme.ButtonSpacing,
|
Margin = theme.ButtonSpacing,
|
||||||
|
|
@ -480,7 +480,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
buttonGroup.AddChild(operationButton);
|
buttonGroup.AddChild(operationButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
var collapseButton = buttonGroup.AddChild(new ThemedIconButton(StaticData.Instance.LoadIcon("collapse_single.png", 8, 16).SetToColor(theme.TextColor), theme));
|
var collapseButton = buttonGroup.AddChild(new ThemedIconButton(StaticData.Instance.LoadIcon("collapse_single.png", 8, 16).GrayToColor(theme.TextColor), theme));
|
||||||
collapseButton.Width = 16 * DeviceScale;
|
collapseButton.Width = 16 * DeviceScale;
|
||||||
collapseButton.ToolTipText = "Collapse".Localize();
|
collapseButton.ToolTipText = "Collapse".Localize();
|
||||||
|
|
||||||
|
|
@ -552,7 +552,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var expandMenuItem = popupMenu.CreateMenuItem("Expand".Localize(), StaticData.Instance.LoadIcon("expand_single.png", 8, 16).SetToColor(theme.TextColor));
|
var expandMenuItem = popupMenu.CreateMenuItem("Expand".Localize(), StaticData.Instance.LoadIcon("expand_single.png", 8, 16).GrayToColor(theme.TextColor));
|
||||||
|
|
||||||
expandMenuItem.Click += (s, e) => UiThread.RunOnIdle(() =>
|
expandMenuItem.Click += (s, e) => UiThread.RunOnIdle(() =>
|
||||||
{
|
{
|
||||||
|
|
@ -689,7 +689,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
{
|
{
|
||||||
ID = "Export",
|
ID = "Export",
|
||||||
Title = "Export".Localize(),
|
Title = "Export".Localize(),
|
||||||
Icon = StaticData.Instance.LoadIcon("cube_export.png", 16, 16).SetToColor(menuTheme.TextColor),
|
Icon = StaticData.Instance.LoadIcon("cube_export.png", 16, 16).GrayToColor(menuTheme.TextColor),
|
||||||
Action = () =>
|
Action = () =>
|
||||||
{
|
{
|
||||||
ApplicationController.Instance.ExportLibraryItems(
|
ApplicationController.Instance.ExportLibraryItems(
|
||||||
|
|
@ -746,7 +746,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
var openMenuItems = new PopupMenu(ApplicationController.Instance.MenuTheme);
|
var openMenuItems = new PopupMenu(ApplicationController.Instance.MenuTheme);
|
||||||
popupMenu.PopupContent = openMenuItems;
|
popupMenu.PopupContent = openMenuItems;
|
||||||
|
|
||||||
var openFileButton = openMenuItems.CreateMenuItem("Add System File to Bed".Localize(), StaticData.Instance.LoadIcon("fa-folder-open_16.png", 16, 16).SetToColor(theme.TextColor));
|
var openFileButton = openMenuItems.CreateMenuItem("Add System File to Bed".Localize(), StaticData.Instance.LoadIcon("fa-folder-open_16.png", 16, 16).GrayToColor(theme.TextColor));
|
||||||
|
|
||||||
openFileButton.Click += (s, e) =>
|
openFileButton.Click += (s, e) =>
|
||||||
{
|
{
|
||||||
|
|
@ -795,7 +795,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
var openColor = theme.ResolveColor(theme.BackgroundColor, theme.SlightShade);
|
var openColor = theme.ResolveColor(theme.BackgroundColor, theme.SlightShade);
|
||||||
|
|
||||||
PopupMenuButton libraryPopup = null;
|
PopupMenuButton libraryPopup = null;
|
||||||
libraryPopup = new PopupMenuButton("Add to Bed".Localize(), StaticData.Instance.LoadIcon("fa-folder-open_16.png", 16, 16).SetToColor(theme.TextColor), theme)
|
libraryPopup = new PopupMenuButton("Add to Bed".Localize(), StaticData.Instance.LoadIcon("fa-folder-open_16.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
MakeScrollable = false,
|
MakeScrollable = false,
|
||||||
Name = "Add Content Menu",
|
Name = "Add Content Menu",
|
||||||
|
|
@ -897,7 +897,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
minimumSupportHeight = sceneContext.Printer.Settings.GetValue<double>(SettingsKey.layer_height) / 2;
|
minimumSupportHeight = sceneContext.Printer.Settings.GetValue<double>(SettingsKey.layer_height) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleSupportButton = new PopupMenuButton(StaticData.Instance.LoadIcon("edit_support.png", 16, 16).SetToColor(theme.TextColor), theme)
|
toggleSupportButton = new PopupMenuButton(StaticData.Instance.LoadIcon("edit_support.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Name = "Support SplitButton",
|
Name = "Support SplitButton",
|
||||||
ToolTipText = "Generate Support".Localize(),
|
ToolTipText = "Generate Support".Localize(),
|
||||||
|
|
@ -921,7 +921,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
{
|
{
|
||||||
ButtonText = "Save".Localize(),
|
ButtonText = "Save".Localize(),
|
||||||
ButtonName = "Save",
|
ButtonName = "Save",
|
||||||
Icon = StaticData.Instance.LoadIcon("save_grey_16x.png", 16, 16).SetToColor(theme.TextColor),
|
Icon = StaticData.Instance.LoadIcon("save_grey_16x.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
ButtonAction = (menuButton) =>
|
ButtonAction = (menuButton) =>
|
||||||
{
|
{
|
||||||
ApplicationController.Instance.Tasks.Execute("Saving".Localize(), sceneContext.Printer, async (progress, cancellationToken) =>
|
ApplicationController.Instance.Tasks.Execute("Saving".Localize(), sceneContext.Printer, async (progress, cancellationToken) =>
|
||||||
|
|
@ -968,7 +968,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
sceneContext.SaveAs(container, newName);
|
sceneContext.SaveAs(container, newName);
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
var export = popupMenu.CreateMenuItem("Export".Localize(), StaticData.Instance.LoadIcon("cube_export.png", 16, 16).SetToColor(theme.TextColor));
|
var export = popupMenu.CreateMenuItem("Export".Localize(), StaticData.Instance.LoadIcon("cube_export.png", 16, 16).GrayToColor(theme.TextColor));
|
||||||
export.Click += (s, e) => UiThread.RunOnIdle(() =>
|
export.Click += (s, e) => UiThread.RunOnIdle(() =>
|
||||||
{
|
{
|
||||||
ApplicationController.Instance.ExportLibraryItems(
|
ApplicationController.Instance.ExportLibraryItems(
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ namespace MatterHackers.MatterControl.PrinterControls
|
||||||
null,
|
null,
|
||||||
theme));
|
theme));
|
||||||
|
|
||||||
var runWizardButton = new ThemedIconButton(StaticData.Instance.LoadIcon("compass.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var runWizardButton = new ThemedIconButton(StaticData.Instance.LoadIcon("compass.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
VAnchor = VAnchor.Center,
|
VAnchor = VAnchor.Center,
|
||||||
Margin = theme.ButtonSpacing,
|
Margin = theme.ButtonSpacing,
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ namespace MatterHackers.MatterControl.PrinterControls
|
||||||
{
|
{
|
||||||
var widget = new MacroControls(printer, theme);
|
var widget = new MacroControls(printer, theme);
|
||||||
|
|
||||||
var editButton = new ThemedIconButton(StaticData.Instance.LoadIcon("icon_edit.png", 16, 16).SetToColor(theme.TextColor), theme);
|
var editButton = new ThemedIconButton(StaticData.Instance.LoadIcon("icon_edit.png", 16, 16).GrayToColor(theme.TextColor), theme);
|
||||||
editButton.Click += (s, e) =>
|
editButton.Click += (s, e) =>
|
||||||
{
|
{
|
||||||
DialogWindow.Show(new MacroListPage(printer.Settings));
|
DialogWindow.Show(new MacroListPage(printer.Settings));
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ namespace MatterHackers.MatterControl.PrinterControls
|
||||||
{
|
{
|
||||||
var widget = new MovementControls(printer, new XYZColors(theme), theme);
|
var widget = new MovementControls(printer, new XYZColors(theme), theme);
|
||||||
|
|
||||||
var editButton = new ThemedIconButton(StaticData.Instance.LoadIcon("icon_edit.png", 16, 16).SetToColor(theme.TextColor), theme);
|
var editButton = new ThemedIconButton(StaticData.Instance.LoadIcon("icon_edit.png", 16, 16).GrayToColor(theme.TextColor), theme);
|
||||||
editButton.Click += (s, e) => widget.EditOptions();
|
editButton.Click += (s, e) => widget.EditOptions();
|
||||||
|
|
||||||
return new SectionWidget(
|
return new SectionWidget(
|
||||||
|
|
@ -130,7 +130,7 @@ namespace MatterHackers.MatterControl.PrinterControls
|
||||||
Margin = new BorderDouble(bottom: 10)
|
Margin = new BorderDouble(bottom: 10)
|
||||||
};
|
};
|
||||||
|
|
||||||
var homeIcon = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-home_16.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var homeIcon = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-home_16.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
ToolTipText = "Home X, Y and Z".Localize(),
|
ToolTipText = "Home X, Y and Z".Localize(),
|
||||||
BackgroundColor = theme.MinimalShade,
|
BackgroundColor = theme.MinimalShade,
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ namespace MatterHackers.MatterControl
|
||||||
MinimumSize = new Vector2(125, 0)
|
MinimumSize = new Vector2(125, 0)
|
||||||
});
|
});
|
||||||
|
|
||||||
var editButton = new ThemedIconButton(StaticData.Instance.LoadIcon("icon_edit.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var editButton = new ThemedIconButton(StaticData.Instance.LoadIcon("icon_edit.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Name = "Edit Leveling Data Button",
|
Name = "Edit Leveling Data Button",
|
||||||
ToolTipText = "Edit Leveling Data".Localize(),
|
ToolTipText = "Edit Leveling Data".Localize(),
|
||||||
|
|
|
||||||
|
|
@ -287,7 +287,7 @@ namespace MatterHackers.MatterControl
|
||||||
Margin = new BorderDouble(left: 10)
|
Margin = new BorderDouble(left: 10)
|
||||||
};
|
};
|
||||||
|
|
||||||
keyboardImage = new ThemedIconButton(StaticData.Instance.LoadIcon("hot_key_small_white.png", 19, 12).SetToColor(theme.TextColor), theme)
|
keyboardImage = new ThemedIconButton(StaticData.Instance.LoadIcon("hot_key_small_white.png", 19, 12).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
HAnchor = HAnchor.Center,
|
HAnchor = HAnchor.Center,
|
||||||
Margin = new BorderDouble(5),
|
Margin = new BorderDouble(5),
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ namespace MatterHackers.MatterControl
|
||||||
VAnchor = VAnchor.Fit,
|
VAnchor = VAnchor.Fit,
|
||||||
};
|
};
|
||||||
|
|
||||||
var configureIcon = StaticData.Instance.LoadIcon("fa-cog_16.png", 16, 16).SetToColor(theme.TextColor);
|
var configureIcon = StaticData.Instance.LoadIcon("fa-cog_16.png", 16, 16).GrayToColor(theme.TextColor);
|
||||||
|
|
||||||
var generalSection = new SectionWidget("General".Localize(), generalPanel, theme, expandingContent: false)
|
var generalSection = new SectionWidget("General".Localize(), generalPanel, theme, expandingContent: false)
|
||||||
{
|
{
|
||||||
|
|
@ -148,7 +148,7 @@ namespace MatterHackers.MatterControl
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
configureNotificationsButton,
|
configureNotificationsButton,
|
||||||
StaticData.Instance.LoadIcon("notify-24x24.png", 16, 16).SetToColor(theme.TextColor)),
|
StaticData.Instance.LoadIcon("notify-24x24.png", 16, 16).GrayToColor(theme.TextColor)),
|
||||||
generalPanel);
|
generalPanel);
|
||||||
|
|
||||||
// LanguageControl
|
// LanguageControl
|
||||||
|
|
@ -351,7 +351,7 @@ namespace MatterHackers.MatterControl
|
||||||
true,
|
true,
|
||||||
false);
|
false);
|
||||||
|
|
||||||
var openCacheButton = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-link_16.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var openCacheButton = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-link_16.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
ToolTipText = "Open Folder".Localize(),
|
ToolTipText = "Open Folder".Localize(),
|
||||||
};
|
};
|
||||||
|
|
@ -367,7 +367,7 @@ namespace MatterHackers.MatterControl
|
||||||
theme),
|
theme),
|
||||||
advancedPanel);
|
advancedPanel);
|
||||||
|
|
||||||
var clearCacheButton = new ThemedHoverIconButton(StaticData.Instance.LoadIcon("remove.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var clearCacheButton = new ThemedHoverIconButton(StaticData.Instance.LoadIcon("remove.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
ToolTipText = "Clear Cache".Localize(),
|
ToolTipText = "Clear Cache".Localize(),
|
||||||
};
|
};
|
||||||
|
|
@ -384,7 +384,7 @@ namespace MatterHackers.MatterControl
|
||||||
advancedPanel);
|
advancedPanel);
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
var configureIcon = StaticData.Instance.LoadIcon("fa-cog_16.png", 16, 16).SetToColor(theme.TextColor);
|
var configureIcon = StaticData.Instance.LoadIcon("fa-cog_16.png", 16, 16).GrayToColor(theme.TextColor);
|
||||||
|
|
||||||
var configurePluginsButton = new ThemedIconButton(configureIcon, theme)
|
var configurePluginsButton = new ThemedIconButton(configureIcon, theme)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@ namespace MatterHackers.MatterControl
|
||||||
Text = "Printers".Localize(),
|
Text = "Printers".Localize(),
|
||||||
HAnchor = HAnchor.Stretch,
|
HAnchor = HAnchor.Stretch,
|
||||||
AlwaysExpandable = true,
|
AlwaysExpandable = true,
|
||||||
Image = StaticData.Instance.LoadIcon("printer.png", 16, 16).SetToColor(theme.TextColor)
|
Image = StaticData.Instance.LoadIcon("printer.png", 16, 16).GrayToColor(theme.TextColor)
|
||||||
};
|
};
|
||||||
rootPrintersNode.TreeView = treeView;
|
rootPrintersNode.TreeView = treeView;
|
||||||
treeView.AddChild(rootPrintersNode);
|
treeView.AddChild(rootPrintersNode);
|
||||||
|
|
|
||||||
|
|
@ -263,7 +263,7 @@ namespace MatterHackers.MatterControl.Tour
|
||||||
public ArrowButton(string text, ArrowDirection arrowDirection, ThemeConfig theme, double pointSize = -1)
|
public ArrowButton(string text, ArrowDirection arrowDirection, ThemeConfig theme, double pointSize = -1)
|
||||||
: base(text, theme, pointSize)
|
: base(text, theme, pointSize)
|
||||||
{
|
{
|
||||||
var rightArrow = StaticData.Instance.LoadIcon("fa-angle-right_12.png", 10, 10).SetToColor(theme.TextColor);
|
var rightArrow = StaticData.Instance.LoadIcon("fa-angle-right_12.png", 10, 10).GrayToColor(theme.TextColor);
|
||||||
|
|
||||||
if (arrowDirection == ArrowDirection.Right)
|
if (arrowDirection == ArrowDirection.Right)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -57,10 +57,10 @@ namespace MatterHackers.MatterControl
|
||||||
this.stage = stage;
|
this.stage = stage;
|
||||||
this.Cursor = Cursors.Hand;
|
this.Cursor = Cursors.Hand;
|
||||||
|
|
||||||
completedIcon = StaticData.Instance.LoadIcon("fa-check_16.png", 16, 16).SetToColor(theme.TextColor).AjustAlpha(0.3);
|
completedIcon = StaticData.Instance.LoadIcon("fa-check_16.png", 16, 16).GrayToColor(theme.TextColor).AjustAlpha(0.3);
|
||||||
recommendedIcon = StaticData.Instance.LoadIcon("SettingsGroupWarning_16x.png", 16, 16).SetToColor(theme.TextColor);
|
recommendedIcon = StaticData.Instance.LoadIcon("SettingsGroupWarning_16x.png", 16, 16).GrayToColor(theme.TextColor);
|
||||||
setupIcon = StaticData.Instance.LoadIcon("SettingsGroupError_16x.png", 16, 16).SetToColor(theme.TextColor);
|
setupIcon = StaticData.Instance.LoadIcon("SettingsGroupError_16x.png", 16, 16).GrayToColor(theme.TextColor);
|
||||||
hoverIcon = StaticData.Instance.LoadIcon("expand.png", 16, 16).SetToColor(theme.TextColor);
|
hoverIcon = StaticData.Instance.LoadIcon("expand.png", 16, 16).GrayToColor(theme.TextColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Active { get; set; }
|
public bool Active { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
||||||
Name = "Preset Pulldown Container"
|
Name = "Preset Pulldown Container"
|
||||||
};
|
};
|
||||||
|
|
||||||
editButton = new ThemedIconButton(StaticData.Instance.LoadIcon("icon_edit.png", 16, 16).SetToColor(theme.TextColor), theme)
|
editButton = new ThemedIconButton(StaticData.Instance.LoadIcon("icon_edit.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
ToolTipText = "Edit Selected Setting".Localize(),
|
ToolTipText = "Edit Selected Setting".Localize(),
|
||||||
Enabled = dropDownList.SelectedIndex != -1,
|
Enabled = dropDownList.SelectedIndex != -1,
|
||||||
|
|
@ -267,7 +267,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
||||||
var addString = layerType == NamedSettingsLayers.Material ? "New Material".Localize() : "New Quality Setting".Localize();
|
var addString = layerType == NamedSettingsLayers.Material ? "New Material".Localize() : "New Quality Setting".Localize();
|
||||||
|
|
||||||
MenuItem addNewPreset = dropDownList.AddItem(
|
MenuItem addNewPreset = dropDownList.AddItem(
|
||||||
StaticData.Instance.LoadIcon("icon_plus.png", 16, 16).SetToColor(theme.TextColor),
|
StaticData.Instance.LoadIcon("icon_plus.png", 16, 16).GrayToColor(theme.TextColor),
|
||||||
addString + "...",
|
addString + "...",
|
||||||
"new",
|
"new",
|
||||||
pointSize: theme.DefaultFontSize);
|
pointSize: theme.DefaultFontSize);
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
||||||
|
|
||||||
if (ShowPortWizardButton)
|
if (ShowPortWizardButton)
|
||||||
{
|
{
|
||||||
var configureIcon = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-cog_16.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var configureIcon = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-cog_16.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
VAnchor = VAnchor.Center,
|
VAnchor = VAnchor.Center,
|
||||||
Margin = theme.ButtonSpacing,
|
Margin = theme.ButtonSpacing,
|
||||||
|
|
|
||||||
|
|
@ -326,7 +326,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
||||||
if (enumDisplayAttibute.IconWidth > 0)
|
if (enumDisplayAttibute.IconWidth > 0)
|
||||||
{
|
{
|
||||||
// If the attribute allows invert, use the theme.InvertIcons state
|
// If the attribute allows invert, use the theme.InvertIcons state
|
||||||
iconImage = StaticData.Instance.LoadIcon(iconPath, enumDisplayAttibute.IconWidth, enumDisplayAttibute.IconHeight).SetToColor(theme.TextColor);
|
iconImage = StaticData.Instance.LoadIcon(iconPath, enumDisplayAttibute.IconWidth, enumDisplayAttibute.IconHeight).GrayToColor(theme.TextColor);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
||||||
|
|
||||||
var widget = new FlowLayoutWidget();
|
var widget = new FlowLayoutWidget();
|
||||||
widget.AddChild(dropdownList);
|
widget.AddChild(dropdownList);
|
||||||
refreshButton = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-refresh_14.png", 14, 14).SetToColor(theme.TextColor), theme)
|
refreshButton = new ThemedIconButton(StaticData.Instance.LoadIcon("fa-refresh_14.png", 14, 14).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Margin = new BorderDouble(left: 5)
|
Margin = new BorderDouble(left: 5)
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
||||||
this.Content.AddChild(inlineEdit);
|
this.Content.AddChild(inlineEdit);
|
||||||
}
|
}
|
||||||
|
|
||||||
var addItem = new ThemedIconButton(StaticData.Instance.LoadIcon("md-add-circle_18.png", 18, 18).SetToColor(theme.TextColor), theme)
|
var addItem = new ThemedIconButton(StaticData.Instance.LoadIcon("md-add-circle_18.png", 18, 18).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
HAnchor = HAnchor.Right | HAnchor.Absolute,
|
HAnchor = HAnchor.Right | HAnchor.Absolute,
|
||||||
Width = theme.ButtonHeight,
|
Width = theme.ButtonHeight,
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
||||||
|
|
||||||
public override void Initialize(int tabIndex)
|
public override void Initialize(int tabIndex)
|
||||||
{
|
{
|
||||||
var editButton = new ThemedIconButton(StaticData.Instance.LoadIcon("icon_edit.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var editButton = new ThemedIconButton(StaticData.Instance.LoadIcon("icon_edit.png", 16, 16).GrayToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
VAnchor = VAnchor.Top,
|
VAnchor = VAnchor.Top,
|
||||||
ToolTipText = "Edit".Localize(),
|
ToolTipText = "Edit".Localize(),
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit ccb6fd61762931e024e0517e287925560c835c9e
|
Subproject commit b11a638ebf5efd5e448f988d06d6e408431c3381
|
||||||
Loading…
Add table
Add a link
Reference in a new issue