Add toolbar to hardware page to fix layout quirks due to splitter

- Issue MatterHackers/MCCentral#4449
This commit is contained in:
John Lewin 2018-10-31 17:35:20 -07:00
parent 3aa10f77dc
commit 6f896beed2

View file

@ -36,6 +36,7 @@ using MatterHackers.MatterControl.CustomWidgets;
using MatterHackers.MatterControl.Library.Widgets.HardwarePage;
using MatterHackers.MatterControl.PartPreviewWindow;
using MatterHackers.MatterControl.SlicerConfiguration;
using MatterHackers.VectorMath;
namespace MatterHackers.MatterControl.PrintLibrary
{
@ -51,6 +52,24 @@ namespace MatterHackers.MatterControl.PrintLibrary
this.HAnchor = HAnchor.Stretch;
this.VAnchor = VAnchor.Stretch;
var toolbar = new Toolbar(theme)
{
HAnchor = HAnchor.Stretch,
VAnchor = VAnchor.Fit,
Padding = theme.ToolbarPadding
};
theme.ApplyBottomBorder(toolbar);
toolbar.AddChild(new TextButton("Inventory".Localize(), theme)
{
Padding = new BorderDouble(6, 0),
MinimumSize = new Vector2(0, theme.ButtonHeight),
Selectable = false
});
this.AddChild(toolbar);
var horizontalSplitter = new Splitter()
{
SplitterDistance = UserSettings.Instance.LibraryViewWidth,