Putting the left and right controls into the same line
This commit is contained in:
parent
e527f58d18
commit
f6204e0eec
2 changed files with 26 additions and 6 deletions
|
|
@ -767,18 +767,38 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
};
|
||||
}
|
||||
|
||||
var moveLeftMenuItem = popupMenu.CreateMenuItem("Move <<".Localize());
|
||||
moveLeftMenuItem.Click += (s, e) =>
|
||||
var moveButtons = new FlowLayoutWidget();
|
||||
|
||||
var textWidget = new TextWidget("Move Tab", pointSize: theme.DefaultFontSize, textColor: theme.TextColor)
|
||||
{
|
||||
Padding = PopupMenu.MenuPadding.Clone(right: 0),
|
||||
VAnchor = VAnchor.Center,
|
||||
};
|
||||
moveButtons.AddChild(textWidget);
|
||||
var moveLeftButton = new TextButton("<<".Localize(), theme)
|
||||
{
|
||||
VAnchor = VAnchor.Center,
|
||||
};
|
||||
moveLeftButton.Click += (s, e) =>
|
||||
{
|
||||
tabs.MoveTabLeft(printerTab);
|
||||
popupMenu.Unfocus();
|
||||
};
|
||||
moveButtons.AddChild(moveLeftButton);
|
||||
|
||||
var moveRightButton = new TextButton(">>".Localize(), theme)
|
||||
{
|
||||
VAnchor = VAnchor.Center,
|
||||
};
|
||||
|
||||
var moveRightMenuItem = popupMenu.CreateMenuItem("Move >>".Localize());
|
||||
moveRightMenuItem.Click += (s, e) =>
|
||||
moveRightButton.Click += (s, e) =>
|
||||
{
|
||||
// move it to the right
|
||||
tabs.MoveTabRight(printerTab);
|
||||
popupMenu.Unfocus();
|
||||
};
|
||||
moveButtons.AddChild(moveRightButton);
|
||||
|
||||
popupMenu.AddChild(moveButtons);
|
||||
|
||||
popupMenu.ShowMenu(printerTab, mouseEvent);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
private ThemeConfig theme;
|
||||
|
||||
public BorderDouble MenuPadding => new BorderDouble(40, 8, 20, 8);
|
||||
public static BorderDouble MenuPadding => new BorderDouble(40, 8, 20, 8);
|
||||
|
||||
public static Color DisabledTextColor { get; set; } = Color.Gray;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue