Adding mutli-material UI support.
This commit is contained in:
parent
eed4306c1f
commit
9e9259bfba
6 changed files with 171 additions and 47 deletions
|
|
@ -196,20 +196,36 @@ namespace MatterHackers.MatterControl
|
|||
public Button GenerateEditButton()
|
||||
{
|
||||
Button editButton = new Button(0, 0, new ButtonViewThreeImage(LoadUpButtonImage("icon_edit_white.png"), LoadUpButtonImage("icon_edit_gray.png"), LoadUpButtonImage("icon_edit_black.png")));
|
||||
editButton.Margin = new BorderDouble(2, -2, 2, 0);
|
||||
editButton.Margin = new BorderDouble(2, 2, 2, 0);
|
||||
editButton.VAnchor = Agg.UI.VAnchor.ParentTop;
|
||||
return editButton;
|
||||
}
|
||||
|
||||
|
||||
public GuiWidget GenerateGroupBoxLabelWithEdit(TextWidget textWidget, out Button editButton)
|
||||
{
|
||||
FlowLayoutWidget groupLableAndEditControl = new FlowLayoutWidget();
|
||||
|
||||
editButton = new Button(0, 0, new ButtonViewThreeImage(LoadUpButtonImage("icon_edit_white.png"), LoadUpButtonImage("icon_edit_gray.png"), LoadUpButtonImage("icon_edit_black.png")));
|
||||
editButton.Margin = new BorderDouble(2, 2, 2, 0);
|
||||
editButton.VAnchor = Agg.UI.VAnchor.ParentBottom;
|
||||
textWidget.VAnchor = Agg.UI.VAnchor.ParentBottom;
|
||||
groupLableAndEditControl.AddChild(textWidget);
|
||||
groupLableAndEditControl.AddChild(editButton);
|
||||
|
||||
return groupLableAndEditControl;
|
||||
|
||||
}
|
||||
|
||||
public GuiWidget GenerateGroupBoxLabelWithEdit(string label, out Button editButton)
|
||||
{
|
||||
FlowLayoutWidget groupLableAndEditControl = new FlowLayoutWidget();
|
||||
|
||||
editButton = new Button(0, 0, new ButtonViewThreeImage(LoadUpButtonImage("icon_edit_white.png"), LoadUpButtonImage("icon_edit_gray.png"), LoadUpButtonImage("icon_edit_black.png")));
|
||||
editButton.Margin = new BorderDouble(2, -2, 2, 0);
|
||||
editButton.VAnchor = Agg.UI.VAnchor.ParentTop;
|
||||
editButton.Margin = new BorderDouble(2, 2, 2, 0);
|
||||
editButton.VAnchor = Agg.UI.VAnchor.ParentBottom;
|
||||
TextWidget textLabel = new TextWidget(label, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize:12);
|
||||
textLabel.VAnchor = Agg.UI.VAnchor.ParentTop;
|
||||
textLabel.VAnchor = Agg.UI.VAnchor.ParentBottom;
|
||||
groupLableAndEditControl.AddChild(textLabel);
|
||||
groupLableAndEditControl.AddChild(editButton);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue