Made 'Open', 'Save' and 'Bed' more intuitive
Added more sliders Fixed issue with load progress indicator not clearing Made value display update for more sliders
This commit is contained in:
parent
2077cf7987
commit
a238c8c4b0
14 changed files with 73 additions and 61 deletions
|
|
@ -549,6 +549,7 @@ namespace MatterHackers.MatterControl
|
||||||
Name = buttonParams.ButtonName,
|
Name = buttonParams.ButtonName,
|
||||||
Enabled = buttonParams.ButtonEnabled,
|
Enabled = buttonParams.ButtonEnabled,
|
||||||
ToolTipText = buttonParams.ButtonTooltip,
|
ToolTipText = buttonParams.ButtonTooltip,
|
||||||
|
Padding = new BorderDouble(5, 0, 5, 0)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -578,14 +579,11 @@ namespace MatterHackers.MatterControl
|
||||||
};
|
};
|
||||||
|
|
||||||
menuButton.Name = buttonParams.ButtonName + " Menu SplitButton";
|
menuButton.Name = buttonParams.ButtonName + " Menu SplitButton";
|
||||||
if (buttonParams.ButtonText == null)
|
menuButton.BackgroundColor = buttonParams.BackgroundColor;
|
||||||
|
if (menuButton.BackgroundColor == Color.Transparent)
|
||||||
{
|
{
|
||||||
menuButton.BackgroundColor = this.ToolbarButtonBackground;
|
menuButton.BackgroundColor = this.ToolbarButtonBackground;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
menuButton.BackgroundColor = this.MinimalShade;
|
|
||||||
}
|
|
||||||
|
|
||||||
menuButton.HoverColor = this.ToolbarButtonHover;
|
menuButton.HoverColor = this.ToolbarButtonHover;
|
||||||
menuButton.MouseDownColor = this.ToolbarButtonDown;
|
menuButton.MouseDownColor = this.ToolbarButtonDown;
|
||||||
|
|
@ -768,5 +766,7 @@ namespace MatterHackers.MatterControl
|
||||||
public Action<PopupMenu> ExtendPopupMenu { get; set; }
|
public Action<PopupMenu> ExtendPopupMenu { get; set; }
|
||||||
|
|
||||||
public string ButtonText { get; set; }
|
public string ButtonText { get; set; }
|
||||||
|
|
||||||
|
public Color BackgroundColor { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -108,7 +108,6 @@ namespace MatterHackers.MatterControl.DesignTools
|
||||||
var ratioToApply = PinchRatio;
|
var ratioToApply = PinchRatio;
|
||||||
|
|
||||||
var distFromCenter = pos.X - aabb.Center.X;
|
var distFromCenter = pos.X - aabb.Center.X;
|
||||||
var distanceToPinch = distFromCenter * (1 - PinchRatio);
|
|
||||||
var delta = (aabb.Center.X + distFromCenter * ratioToApply) - pos.X;
|
var delta = (aabb.Center.X + distFromCenter * ratioToApply) - pos.X;
|
||||||
|
|
||||||
// find out how much to pinch based on y position
|
// find out how much to pinch based on y position
|
||||||
|
|
|
||||||
|
|
@ -414,6 +414,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
||||||
UiThread.RunOnIdle(() =>
|
UiThread.RunOnIdle(() =>
|
||||||
{
|
{
|
||||||
rebuildLock.Dispose();
|
rebuildLock.Dispose();
|
||||||
|
Invalidate(InvalidateType.DisplayValues);
|
||||||
Parent?.Invalidate(new InvalidateArgs(this, InvalidateType.Path));
|
Parent?.Invalidate(new InvalidateArgs(this, InvalidateType.Path));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,8 @@ namespace MatterHackers.MatterControl.DesignTools
|
||||||
[DisplayName("Back Ratio")]
|
[DisplayName("Back Ratio")]
|
||||||
[Description("Describes the percent that the back of the part will be pinched")]
|
[Description("Describes the percent that the back of the part will be pinched")]
|
||||||
[DescriptionImage("https://lh3.googleusercontent.com/CAi26qYHHdneoU0yhaY2bdVU4RJP7PDCjEUrC3i-smstyvm2FC_dteHU16eYyEyK9krCyK3C2TkSpE5YDcAkHBwq40ddaLBQ13yVdQCB")]
|
[DescriptionImage("https://lh3.googleusercontent.com/CAi26qYHHdneoU0yhaY2bdVU4RJP7PDCjEUrC3i-smstyvm2FC_dteHU16eYyEyK9krCyK3C2TkSpE5YDcAkHBwq40ddaLBQ13yVdQCB")]
|
||||||
public double PinchPercent { get; set; } = 50;
|
[Slider(0, 300, Easing.EaseType.Quadratic, snapDistance: 1)]
|
||||||
|
public DoubleOrExpression PinchPercent { get; set; } = 50;
|
||||||
|
|
||||||
public override Task Rebuild()
|
public override Task Rebuild()
|
||||||
{
|
{
|
||||||
|
|
@ -73,7 +74,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
||||||
|
|
||||||
bool valuesChanged = false;
|
bool valuesChanged = false;
|
||||||
|
|
||||||
PinchPercent = agg_basics.Clamp(PinchPercent, 0, 3, ref valuesChanged);
|
var pinchPercent = PinchPercent.ClampIfNotCalculated(this, 0, 300, ref valuesChanged);
|
||||||
|
|
||||||
foreach (var sourceItem in SourceContainer.VisibleMeshes())
|
foreach (var sourceItem in SourceContainer.VisibleMeshes())
|
||||||
{
|
{
|
||||||
|
|
@ -87,7 +88,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
||||||
var pos = originalMesh.Vertices[i];
|
var pos = originalMesh.Vertices[i];
|
||||||
pos = pos.Transform(itemMatrix);
|
pos = pos.Transform(itemMatrix);
|
||||||
|
|
||||||
var ratioToApply = PinchPercent / 100.0;
|
var ratioToApply = pinchPercent / 100.0;
|
||||||
|
|
||||||
var distFromCenter = pos.X - aabb.Center.X;
|
var distFromCenter = pos.X - aabb.Center.X;
|
||||||
var distanceToPinch = distFromCenter * (1 - ratioToApply);
|
var distanceToPinch = distFromCenter * (1 - ratioToApply);
|
||||||
|
|
@ -116,10 +117,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
||||||
SourceContainer.Visible = false;
|
SourceContainer.Visible = false;
|
||||||
rebuildLocks.Dispose();
|
rebuildLocks.Dispose();
|
||||||
|
|
||||||
if (valuesChanged)
|
Invalidate(InvalidateType.DisplayValues);
|
||||||
{
|
|
||||||
Invalidate(InvalidateType.DisplayValues);
|
|
||||||
}
|
|
||||||
|
|
||||||
Invalidate(InvalidateType.Children);
|
Invalidate(InvalidateType.Children);
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
||||||
public DoubleOrExpression CalculationHeight { get; set; } = .1;
|
public DoubleOrExpression CalculationHeight { get; set; } = .1;
|
||||||
|
|
||||||
[DisplayName("Expand")]
|
[DisplayName("Expand")]
|
||||||
[Slider(1, 100, Easing.EaseType.Quadratic, snapDistance: 1)]
|
[Slider(1, 30, Easing.EaseType.Quadratic, snapDistance: .5)]
|
||||||
public DoubleOrExpression BaseSize { get; set; } = 3;
|
public DoubleOrExpression BaseSize { get; set; } = 3;
|
||||||
|
|
||||||
[Slider(1, 20, Easing.EaseType.Quadratic, snapDistance: .1)]
|
[Slider(1, 20, Easing.EaseType.Quadratic, snapDistance: .1)]
|
||||||
|
|
@ -257,6 +257,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
||||||
UiThread.RunOnIdle(() =>
|
UiThread.RunOnIdle(() =>
|
||||||
{
|
{
|
||||||
rebuildLock.Dispose();
|
rebuildLock.Dispose();
|
||||||
|
Invalidate(InvalidateType.DisplayValues);
|
||||||
Parent?.Invalidate(new InvalidateArgs(this, InvalidateType.Children));
|
Parent?.Invalidate(new InvalidateArgs(this, InvalidateType.Children));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -189,6 +189,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
||||||
UiThread.RunOnIdle(() =>
|
UiThread.RunOnIdle(() =>
|
||||||
{
|
{
|
||||||
rebuildLock.Dispose();
|
rebuildLock.Dispose();
|
||||||
|
Invalidate(InvalidateType.DisplayValues);
|
||||||
Parent?.Invalidate(new InvalidateArgs(this, InvalidateType.Children));
|
Parent?.Invalidate(new InvalidateArgs(this, InvalidateType.Children));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
string thumbnailId = libraryItem.ID;
|
string thumbnailId = libraryItem.ID;
|
||||||
|
|
||||||
var thumbnail = GetThumbnail(object3D, thumbnailId, width, height);
|
var thumbnail = GenerateThumbnail(object3D, thumbnailId, width, height);
|
||||||
if (thumbnail != null)
|
if (thumbnail != null)
|
||||||
{
|
{
|
||||||
// Cache content thumbnail
|
// Cache content thumbnail
|
||||||
|
|
@ -151,7 +151,7 @@ namespace MatterHackers.MatterControl
|
||||||
}
|
}
|
||||||
|
|
||||||
// Limit to private scope until need returns
|
// Limit to private scope until need returns
|
||||||
private ImageBuffer GetThumbnail(IObject3D item, string thumbnailId, int width, int height)
|
private ImageBuffer GenerateThumbnail(IObject3D item, string thumbnailId, int width, int height)
|
||||||
{
|
{
|
||||||
if (item == null)
|
if (item == null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1057,12 +1057,17 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
||||||
if (mouseEvent.Button == MouseButtons.XButton1)
|
if (mouseEvent.Button == MouseButtons.XButton1)
|
||||||
{
|
{
|
||||||
// user pressed the back button
|
// user pressed the back button
|
||||||
breadCrumbWidget.NavigateBack();
|
NavigateBack();
|
||||||
}
|
}
|
||||||
|
|
||||||
base.OnMouseDown(mouseEvent);
|
base.OnMouseDown(mouseEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void NavigateBack()
|
||||||
|
{
|
||||||
|
breadCrumbWidget.NavigateBack();
|
||||||
|
}
|
||||||
|
|
||||||
public override void OnMouseMove(MouseEventArgs mouseEvent)
|
public override void OnMouseMove(MouseEventArgs mouseEvent)
|
||||||
{
|
{
|
||||||
if (PositionWithinLocalBounds(mouseEvent.X, mouseEvent.Y)
|
if (PositionWithinLocalBounds(mouseEvent.X, mouseEvent.Y)
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,14 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PopupMenuButton(string text, ImageBuffer imageBuffer, ThemeConfig theme)
|
||||||
|
: this(new TextIconButton(text, imageBuffer, theme)
|
||||||
|
{
|
||||||
|
Padding = new BorderDouble(5, 0, 5, 0),
|
||||||
|
}, theme)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public PopupMenuButton(GuiWidget viewWidget, ThemeConfig theme)
|
public PopupMenuButton(GuiWidget viewWidget, ThemeConfig theme)
|
||||||
: base(viewWidget)
|
: base(viewWidget)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
e.Graphics2D.PopTransform();
|
e.Graphics2D.PopTransform();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (view3DWidget?.Scene?.Contains(TrackingObject) != true)
|
||||||
|
{
|
||||||
|
RemoveProgressBar();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ProgressReporter(double progress0To1, string processingState)
|
public void ProgressReporter(double progress0To1, string processingState)
|
||||||
|
|
@ -104,13 +109,18 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
if (progress0To1 > 1.1)
|
if (progress0To1 > 1.1)
|
||||||
{
|
{
|
||||||
view3DWidget?.Invalidate();
|
RemoveProgressBar();
|
||||||
progressBar.Close();
|
|
||||||
if (view3DWidget != null)
|
|
||||||
{
|
|
||||||
view3DWidget.AfterDraw -= View3DWidget_AfterDraw;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void RemoveProgressBar()
|
||||||
|
{
|
||||||
|
progressBar.Close();
|
||||||
|
if (view3DWidget != null)
|
||||||
|
{
|
||||||
|
view3DWidget.AfterDraw -= View3DWidget_AfterDraw;
|
||||||
|
}
|
||||||
|
view3DWidget?.Invalidate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -210,6 +210,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
var exportGCodeButton = menuTheme.CreateSplitButton(new SplitButtonParams()
|
var exportGCodeButton = menuTheme.CreateSplitButton(new SplitButtonParams()
|
||||||
{
|
{
|
||||||
ButtonText = "Export".Localize(),
|
ButtonText = "Export".Localize(),
|
||||||
|
BackgroundColor = theme.MinimalShade,
|
||||||
ButtonTooltip = exportPlugin.Enabled ? exportType : exportPlugin.DisabledReason,
|
ButtonTooltip = exportPlugin.Enabled ? exportType : exportPlugin.DisabledReason,
|
||||||
ExtendPopupMenu = (popupMenu) =>
|
ExtendPopupMenu = (popupMenu) =>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
private readonly Dictionary<GuiWidget, SceneOperation> operationButtons;
|
private readonly Dictionary<GuiWidget, SceneOperation> operationButtons;
|
||||||
private MainViewWidget mainViewWidget = null;
|
private MainViewWidget mainViewWidget = null;
|
||||||
private readonly PopupMenuButton bedMenuButton;
|
private readonly PopupMenuButton bedMenuButton;
|
||||||
private readonly ThemeConfig theme;
|
|
||||||
private readonly UndoBuffer undoBuffer;
|
private readonly UndoBuffer undoBuffer;
|
||||||
private readonly IconButton undoButton;
|
private readonly IconButton undoButton;
|
||||||
private readonly IconButton redoButton;
|
private readonly IconButton redoButton;
|
||||||
|
|
@ -95,7 +94,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
public ViewControls3D(PartWorkspace workspace, ThemeConfig theme, UndoBuffer undoBuffer, bool isPrinterType, bool showPrintButton)
|
public ViewControls3D(PartWorkspace workspace, ThemeConfig theme, UndoBuffer undoBuffer, bool isPrinterType, bool showPrintButton)
|
||||||
: base(theme)
|
: base(theme)
|
||||||
{
|
{
|
||||||
this.theme = theme;
|
|
||||||
this.undoBuffer = undoBuffer;
|
this.undoBuffer = undoBuffer;
|
||||||
this.ActionArea.Click += (s, e) =>
|
this.ActionArea.Click += (s, e) =>
|
||||||
{
|
{
|
||||||
|
|
@ -127,16 +125,17 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
this.sceneContext = workspace.SceneContext;
|
this.sceneContext = workspace.SceneContext;
|
||||||
this.workspace = workspace;
|
this.workspace = workspace;
|
||||||
|
|
||||||
string iconPath;
|
this.AddChild(CreateOpenButton(sceneContext, theme));
|
||||||
|
|
||||||
this.AddChild(CreateAddButton(sceneContext, theme));
|
this.AddChild(CreateOpenFileButton(theme));
|
||||||
|
|
||||||
|
this.AddChild(CreateSaveButton(theme));
|
||||||
|
|
||||||
this.AddChild(new ToolbarSeparator(theme.GetBorderColor(50), theme.SeparatorMargin));
|
this.AddChild(new ToolbarSeparator(theme.GetBorderColor(50), theme.SeparatorMargin));
|
||||||
|
|
||||||
bedMenuButton = new PopupMenuButton(StaticData.Instance.LoadIcon("bed.png", 16, 16).SetToColor(theme.TextColor), theme)
|
bedMenuButton = new PopupMenuButton("Bed".Localize(), StaticData.Instance.LoadIcon("bed.png", 16, 16).SetToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Name = "Bed Options Menu",
|
Name = "Bed Options Menu",
|
||||||
ToolTipText = "Bed",
|
|
||||||
Enabled = true,
|
Enabled = true,
|
||||||
Margin = theme.ButtonSpacing,
|
Margin = theme.ButtonSpacing,
|
||||||
VAnchor = VAnchor.Center,
|
VAnchor = VAnchor.Center,
|
||||||
|
|
@ -147,12 +146,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
this.AddChild(new ToolbarSeparator(theme.GetBorderColor(50), theme.SeparatorMargin));
|
this.AddChild(new ToolbarSeparator(theme.GetBorderColor(50), theme.SeparatorMargin));
|
||||||
|
|
||||||
this.AddChild(CreateOpenButton(theme));
|
|
||||||
|
|
||||||
this.AddChild(CreateSaveButton(theme));
|
|
||||||
|
|
||||||
this.AddChild(new ToolbarSeparator(theme.GetBorderColor(50), theme.SeparatorMargin));
|
|
||||||
|
|
||||||
undoButton = new IconButton(StaticData.Instance.LoadIcon("undo.png", 16, 16).SetToColor(theme.TextColor), theme)
|
undoButton = new IconButton(StaticData.Instance.LoadIcon("undo.png", 16, 16).SetToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
Name = "3D View Undo",
|
Name = "3D View Undo",
|
||||||
|
|
@ -509,14 +502,23 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
redoButton.Enabled = undoBuffer.RedoCount > 0;
|
redoButton.Enabled = undoBuffer.RedoCount > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private IconButton CreateOpenButton(ThemeConfig theme)
|
private GuiWidget CreateOpenFileButton(ThemeConfig theme)
|
||||||
{
|
{
|
||||||
var openButton = new IconButton(StaticData.Instance.LoadIcon("fa-folder-open_16.png", 16, 16).SetToColor(theme.TextColor), theme)
|
var popupMenu = new PopupMenuButton("", theme)
|
||||||
{
|
{
|
||||||
Margin = theme.ButtonSpacing,
|
|
||||||
ToolTipText = "Open File".Localize(),
|
|
||||||
Name = "Open File Button"
|
Name = "Open File Button"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (popupMenu.Children<SimpleButton>().FirstOrDefault() is SimpleButton simpleButton)
|
||||||
|
{
|
||||||
|
simpleButton.Padding = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
var openMenuItems = new PopupMenu(ApplicationController.Instance.MenuTheme);
|
||||||
|
popupMenu.PopupContent = openMenuItems;
|
||||||
|
|
||||||
|
var openButton = openMenuItems.CreateMenuItem("Open File".Localize(), StaticData.Instance.LoadIcon("fa-folder-open_16.png", 16, 16).SetToColor(theme.TextColor));
|
||||||
|
|
||||||
openButton.Click += (s, e) =>
|
openButton.Click += (s, e) =>
|
||||||
{
|
{
|
||||||
var extensionsWithoutPeriod = new HashSet<string>(ApplicationSettings.OpenDesignFileParams.Split('|').First().Split(',').Select(t => t.Trim().Trim('.')));
|
var extensionsWithoutPeriod = new HashSet<string>(ApplicationSettings.OpenDesignFileParams.Split('|').First().Split(',').Select(t => t.Trim().Trim('.')));
|
||||||
|
|
@ -543,7 +545,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
});
|
});
|
||||||
}, .1);
|
}, .1);
|
||||||
};
|
};
|
||||||
return openButton;
|
|
||||||
|
return popupMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateToolbarButtons(object sender, EventArgs e)
|
private void UpdateToolbarButtons(object sender, EventArgs e)
|
||||||
|
|
@ -576,30 +579,15 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private GuiWidget CreateAddButton(ISceneContext sceneContext, ThemeConfig theme)
|
private GuiWidget CreateOpenButton(ISceneContext sceneContext, ThemeConfig theme)
|
||||||
{
|
{
|
||||||
var buttonView = new TextIconButton(
|
|
||||||
"",
|
|
||||||
StaticData.Instance.LoadIcon("cube_add.png", 16, 16).SetToColor(theme.TextColor),
|
|
||||||
theme);
|
|
||||||
|
|
||||||
// Remove right Padding for drop style
|
|
||||||
buttonView.Padding = buttonView.Padding.Clone(right: 0);
|
|
||||||
|
|
||||||
var popupMenu = new PopupMenu(ApplicationController.Instance.MenuTheme)
|
|
||||||
{
|
|
||||||
HAnchor = HAnchor.Fit,
|
|
||||||
VAnchor = VAnchor.Fit,
|
|
||||||
};
|
|
||||||
|
|
||||||
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(buttonView, theme)
|
libraryPopup = new PopupMenuButton("Open".Localize(), StaticData.Instance.LoadIcon("fa-folder-open_16.png", 16, 16).SetToColor(theme.TextColor), theme)
|
||||||
{
|
{
|
||||||
MakeScrollable = false,
|
MakeScrollable = false,
|
||||||
Name = "Add Content Menu",
|
Name = "Add Content Menu",
|
||||||
ToolTipText = "Add Content".Localize(),
|
|
||||||
AlwaysKeepOpen = true,
|
AlwaysKeepOpen = true,
|
||||||
DynamicPopupContent = () =>
|
DynamicPopupContent = () =>
|
||||||
{
|
{
|
||||||
|
|
@ -678,8 +666,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
HoverColor = theme.ToolbarButtonHover,
|
HoverColor = theme.ToolbarButtonHover,
|
||||||
MouseDownColor = theme.ToolbarButtonDown,
|
MouseDownColor = theme.ToolbarButtonDown,
|
||||||
OpenColor = openColor,
|
OpenColor = openColor,
|
||||||
DrawArrow = true,
|
// DrawArrow = true,
|
||||||
Margin = theme.ButtonSpacing,
|
Margin = 0,
|
||||||
PopupBorderColor = Color.Transparent,
|
PopupBorderColor = Color.Transparent,
|
||||||
PopupHAnchor = HAnchor.Fit,
|
PopupHAnchor = HAnchor.Fit,
|
||||||
PopupVAnchor = VAnchor.Fit
|
PopupVAnchor = VAnchor.Fit
|
||||||
|
|
@ -720,6 +708,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
{
|
{
|
||||||
return theme.CreateSplitButton(new SplitButtonParams()
|
return theme.CreateSplitButton(new SplitButtonParams()
|
||||||
{
|
{
|
||||||
|
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).SetToColor(theme.TextColor),
|
||||||
ButtonAction = (menuButton) =>
|
ButtonAction = (menuButton) =>
|
||||||
|
|
@ -740,7 +729,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
menuButton.Enabled = true;
|
menuButton.Enabled = true;
|
||||||
}).ConfigureAwait(false);
|
}).ConfigureAwait(false);
|
||||||
},
|
},
|
||||||
ButtonTooltip = "Save".Localize(),
|
|
||||||
ExtendPopupMenu = (PopupMenu popupMenu) =>
|
ExtendPopupMenu = (PopupMenu popupMenu) =>
|
||||||
{
|
{
|
||||||
var saveAs = popupMenu.CreateMenuItem("Save As".Localize());
|
var saveAs = popupMenu.CreateMenuItem("Save As".Localize());
|
||||||
|
|
|
||||||
BIN
StaticData/Icons/Library/computer_icon.png
Normal file
BIN
StaticData/Icons/Library/computer_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
|
|
@ -1 +1 @@
|
||||||
Subproject commit 51adb3d9b5bcd805a53faac324527c6e0121deb2
|
Subproject commit da9b0722d31c00b9c02cd5afda29cdb7305209dc
|
||||||
Loading…
Add table
Add a link
Reference in a new issue