Improving the scroll bars

This commit is contained in:
Lars Brubaker 2015-09-11 16:41:20 -07:00
parent a0659dc8bb
commit 20b4bba75e
6 changed files with 9 additions and 20 deletions

View file

@ -77,7 +77,7 @@ namespace MatterHackers.MatterControl.CustomWidgets.LibrarySelector
{
this.AnchorAll();
this.BackgroundColor = ActiveTheme.Instance.SecondaryBackgroundColor;
this.ScrollArea.Padding = new BorderDouble(3, 3, 5, 3);
this.ScrollArea.Padding = new BorderDouble(3);
}
ScrollArea.HAnchor = HAnchor.ParentLeftRight;

View file

@ -74,7 +74,7 @@ namespace MatterHackers.MatterControl.PrintHistory
this.AnchorAll();
this.BackgroundColor = ActiveTheme.Instance.SecondaryBackgroundColor;
this.AutoScroll = true;
this.ScrollArea.Padding = new BorderDouble(3, 3, 15, 3);
this.ScrollArea.Padding = new BorderDouble(3);
}
public void LoadHistoryItems(int NumItemsToLoad = 0)

View file

@ -73,7 +73,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
{
this.AnchorAll();
this.BackgroundColor = ActiveTheme.Instance.SecondaryBackgroundColor;
this.ScrollArea.Padding = new BorderDouble(3, 3, 5, 3);
this.ScrollArea.Padding = new BorderDouble(3);
}
ScrollArea.HAnchor = HAnchor.ParentLeftRight;
@ -164,17 +164,6 @@ namespace MatterHackers.MatterControl.PrintLibrary
currentTopLeftOffset = TopLeftOffset;
}
settingLocalBounds = true;
if (topToBottomItemList != null)
{
if (VerticalScrollBar.Visible)
{
topToBottomItemList.Width = Math.Max(0, value.Width - ScrollArea.Padding.Width - topToBottomItemList.Margin.Width - VerticalScrollBar.Width);
}
else
{
topToBottomItemList.Width = Math.Max(0, value.Width - ScrollArea.Padding.Width - topToBottomItemList.Margin.Width);
}
}
base.LocalBounds = value;
if (Parent != null)

View file

@ -52,7 +52,7 @@ namespace MatterHackers.MatterControl.PrintQueue
this.AnchorAll();
this.BackgroundColor = ActiveTheme.Instance.SecondaryBackgroundColor;
this.AutoScroll = true;
this.ScrollArea.Padding = new BorderDouble(3, 3, 15, 3);
this.ScrollArea.Padding = new BorderDouble(3);
}
private bool editMode = false;
@ -313,12 +313,12 @@ namespace MatterHackers.MatterControl.PrintQueue
SetDisplayAttributes();
AddWatermark();
ScrollArea.HAnchor |= Agg.UI.HAnchor.ParentLeftRight;
ScrollArea.HAnchor = HAnchor.ParentLeftRight;
AutoScroll = true;
topToBottomItemList = new FlowLayoutWidget(FlowDirection.TopToBottom);
topToBottomItemList.Name = "PrintQueueControl TopToBottom";
topToBottomItemList.HAnchor = Agg.UI.HAnchor.Max_FitToChildren_ParentWidth;
topToBottomItemList.HAnchor = HAnchor.ParentLeftRight;
base.AddChild(topToBottomItemList);
for (int i = 0; i < QueueData.Instance.Count; i++)
@ -462,7 +462,7 @@ namespace MatterHackers.MatterControl.PrintQueue
FlowLayoutWidget itemHolder = new FlowLayoutWidget();
itemHolder.Name = "PrintQueueControl itemHolder";
itemHolder.Margin = new BorderDouble(0, 0, 0, 0);
itemHolder.HAnchor = Agg.UI.HAnchor.Max_FitToChildren_ParentWidth;
itemHolder.HAnchor = HAnchor.ParentLeftRight;
itemHolder.AddChild(childToAdd);
itemHolder.VAnchor = VAnchor.FitToChildren;
topToBottomItemList.AddChild(itemHolder, indexInChildrenList);

@ -1 +1 @@
Subproject commit c0727e03f76f04ede32a8408985c679834bdee59
Subproject commit f951f8d77dbd9f378c8d03ef26c2aca3ce952920

View file

@ -66,7 +66,7 @@ namespace MatterHackers.MatterControl.UI
};
outerContainer.AddChild(topToBottomContainer);
CheckBox toggleBox = ImageButtonFactory.CreateToggleSwitch(true);
CheckBox toggleBox = new CheckBox("test");
toggleBox.HAnchor = HAnchor.ParentLeftRight;
toggleBox.VAnchor = VAnchor.ParentBottomTop;
toggleBox.Margin = new BorderDouble(marginSize);