Merge pull request #2782 from larsbrubaker/design_tools
Changed copy button to duplicate
This commit is contained in:
commit
33eb87dbba
3 changed files with 24 additions and 7 deletions
|
|
@ -91,6 +91,7 @@ namespace MatterHackers.MatterControl
|
||||||
public TextImageButtonFactory imageConverterExpandMenuOptionFactory;
|
public TextImageButtonFactory imageConverterExpandMenuOptionFactory;
|
||||||
|
|
||||||
public TextImageButtonFactory imageConverterButtonFactory;
|
public TextImageButtonFactory imageConverterButtonFactory;
|
||||||
|
public TextImageButtonFactory imageConverterUnlockButtonFactory;
|
||||||
|
|
||||||
public Color TabBodyBackground => new Color(ActiveTheme.Instance.TertiaryBackgroundColor, 175);
|
public Color TabBodyBackground => new Color(ActiveTheme.Instance.TertiaryBackgroundColor, 175);
|
||||||
|
|
||||||
|
|
@ -306,6 +307,22 @@ namespace MatterHackers.MatterControl
|
||||||
BorderWidth = 1,
|
BorderWidth = 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
imageConverterUnlockButtonFactory = new TextImageButtonFactory(new ButtonFactoryOptions(commonOptions)
|
||||||
|
{
|
||||||
|
FixedWidth = 185,
|
||||||
|
FixedHeight = 30,
|
||||||
|
|
||||||
|
NormalFillColor = ActiveTheme.Instance.PrimaryAccentColor.SetLightness(.8).ToColor(),
|
||||||
|
NormalTextColor = Color.Black,
|
||||||
|
NormalBorderColor = new Color(ActiveTheme.Instance.PrimaryAccentColor.SetLightness(.8).ToColor(), 200),
|
||||||
|
|
||||||
|
HoverFillColor = ActiveTheme.Instance.PrimaryAccentColor.SetLightness(.9).ToColor(),
|
||||||
|
HoverTextColor = Color.Black,
|
||||||
|
HoverBorderColor = new Color(ActiveTheme.Instance.PrimaryAccentColor.SetLightness(.9).ToColor(), 200),
|
||||||
|
|
||||||
|
BorderWidth = 1,
|
||||||
|
});
|
||||||
|
|
||||||
imageConverterExpandMenuOptionFactory = new TextImageButtonFactory(new ButtonFactoryOptions(commonOptions)
|
imageConverterExpandMenuOptionFactory = new TextImageButtonFactory(new ButtonFactoryOptions(commonOptions)
|
||||||
{
|
{
|
||||||
FixedWidth = 200,
|
FixedWidth = 200,
|
||||||
|
|
|
||||||
|
|
@ -268,18 +268,18 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
selectionActionBar.AddChild(this.CreateActionSeparator());
|
selectionActionBar.AddChild(this.CreateActionSeparator());
|
||||||
|
|
||||||
var copyButton = smallMarginButtonFactory.Generate("Copy".Localize());
|
var duplicateButton = smallMarginButtonFactory.Generate("Duplicate".Localize());
|
||||||
copyButton.Name = "3D View Copy";
|
duplicateButton.Name = "3D View Copy";
|
||||||
copyButton.Margin = buttonSpacing;
|
duplicateButton.Margin = buttonSpacing;
|
||||||
copyButton.Click += (sender, e) =>
|
duplicateButton.Click += (sender, e) =>
|
||||||
{
|
{
|
||||||
this.Scene.DuplicateSelection(this);
|
this.Scene.DuplicateSelection(this);
|
||||||
};
|
};
|
||||||
this.Scene.SelectionChanged += (s, e) =>
|
this.Scene.SelectionChanged += (s, e) =>
|
||||||
{
|
{
|
||||||
copyButton.Enabled = this.Scene.HasSelection;
|
duplicateButton.Enabled = this.Scene.HasSelection;
|
||||||
};
|
};
|
||||||
selectionActionBar.AddChild(copyButton);
|
selectionActionBar.AddChild(duplicateButton);
|
||||||
|
|
||||||
var deleteButton = smallMarginButtonFactory.Generate("Remove".Localize());
|
var deleteButton = smallMarginButtonFactory.Generate("Remove".Localize());
|
||||||
deleteButton.Name = "3D View Remove";
|
deleteButton.Name = "3D View Remove";
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 4a00055f6ed13dc4649d13c4cb499f3b7e09b202
|
Subproject commit 37dcb2f6fed1868eb9e557d82ef7be1b893ff332
|
||||||
Loading…
Add table
Add a link
Reference in a new issue