This commit is contained in:
John Lewin 2018-10-25 14:43:21 -07:00
parent 4ba7fd33cb
commit 6b71d70e0a
5 changed files with 11 additions and 9 deletions

View file

@ -183,7 +183,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
{
Width = this.ConstrainedWidth,
VAnchor = VAnchor.Stretch,
SpliterBarColor = theme.SplitterBackground,
SplitterBarColor = theme.SplitterBackground,
SplitterWidth = theme.SplitterWidth,
MinimumSize = new Vector2(this.MinDockingWidth, 0)
};
@ -255,7 +255,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
VAnchor = VAnchor.Stretch,
HAnchor = HAnchor.Right,
BackgroundColor = theme.ActiveTabColor,
SpliterBarColor = theme.SplitterBackground,
SplitterBarColor = theme.SplitterBackground,
SplitterWidth = theme.SplitterWidth,
};
resizeContainer.AddChild(new DockingWindowContent(this, item.widget, item.text, theme)

View file

@ -53,7 +53,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
this.grabSide = grabSide;
this.HAnchor = HAnchor.Absolute;
this.SplitterWidth = theme.SplitterWidth;
this.SpliterBarColor = theme.SplitterBackground;
this.SplitterBarColor = theme.SplitterBackground;
}
public override Cursors Cursor
@ -71,7 +71,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
set => base.Cursor = value;
}
public Color SpliterBarColor { get; set; }
public Color SplitterBarColor { get; set; }
public int SplitterWidth
{
@ -81,6 +81,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
if (_splitterWidth != value)
{
_splitterWidth = value;
if (grabSide == GrabBarSide.Left)
{
this.Padding = new BorderDouble(_splitterWidth, 0, 0, 0);
@ -89,6 +90,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
{
this.Padding = new BorderDouble(0, 0, _splitterWidth, 0);
}
this.MinimumSize = new VectorMath.Vector2(_splitterWidth, 0);
}
}
@ -103,11 +105,11 @@ namespace MatterHackers.MatterControl.CustomWidgets
{
if (grabSide == GrabBarSide.Left)
{
graphics2D.FillRectangle(LocalBounds.Left, LocalBounds.Bottom, LocalBounds.Left + this.SplitterWidth, LocalBounds.Top, this.SpliterBarColor);
graphics2D.FillRectangle(LocalBounds.Left, LocalBounds.Bottom, LocalBounds.Left + this.SplitterWidth, LocalBounds.Top, this.SplitterBarColor);
}
else
{
graphics2D.FillRectangle(LocalBounds.Right - this.SplitterWidth, LocalBounds.Bottom, LocalBounds.Right, LocalBounds.Top, this.SpliterBarColor);
graphics2D.FillRectangle(LocalBounds.Right - this.SplitterWidth, LocalBounds.Bottom, LocalBounds.Right, LocalBounds.Top, this.SplitterBarColor);
}
base.OnDraw(graphics2D);

View file

@ -166,7 +166,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
Width = printer?.ViewState.SelectedObjectPanelWidth ?? 200,
VAnchor = VAnchor.Stretch,
HAnchor = HAnchor.Absolute,
SpliterBarColor = theme.SplitterBackground,
SplitterBarColor = theme.SplitterBackground,
SplitterWidth = theme.SplitterWidth,
Visible = false,
};

View file

@ -163,7 +163,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
VAnchor = VAnchor.Stretch,
HAnchor = HAnchor.Absolute,
BackgroundColor = theme.InteractionLayerOverlayColor,
SpliterBarColor = theme.SplitterBackground,
SplitterBarColor = theme.SplitterBackground,
SplitterWidth = theme.SplitterWidth,
MinimumSize = new Vector2(theme.SplitterWidth, 0)
};

View file

@ -544,7 +544,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
var verticalResizeContainer = new VerticalResizeContainer(theme, GrabBarSide.Right)
{
BackgroundColor = theme.TabBarBackground,
BackgroundColor = Color.Red,
Padding = new BorderDouble(0, 0, theme.DefaultContainerPadding / 2, 0),
MinimumSize = new Vector2(120, 50),
Height = libraryPopup.TransformToScreenSpace(libraryPopup.Position).Y,