From 92096291bc026f7c6c1695fe9b6bb44882e4257e Mon Sep 17 00:00:00 2001 From: kevinepope Date: Sat, 1 Mar 2014 18:48:25 -0800 Subject: [PATCH] Stylistic exploration. --- ConfigurationPage/ConfigurationPage.cs | 2 +- CustomWidgets/DisableableWidget.cs | 2 +- PrinterControls/ManualPrinterControls.cs | 2 +- WidescreenPanel.cs | 53 ++++++++++++++++++++---- 4 files changed, 48 insertions(+), 11 deletions(-) diff --git a/ConfigurationPage/ConfigurationPage.cs b/ConfigurationPage/ConfigurationPage.cs index dbad8f9fa..d82dc42ed 100644 --- a/ConfigurationPage/ConfigurationPage.cs +++ b/ConfigurationPage/ConfigurationPage.cs @@ -285,7 +285,7 @@ namespace MatterHackers.MatterControl private void SetDisplayAttributes() { - this.BackgroundColor = ActiveTheme.Instance.PrimaryAccentColor; + this.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor; this.textImageButtonFactory.normalFillColor = RGBA_Bytes.White; this.textImageButtonFactory.disabledFillColor = RGBA_Bytes.White; diff --git a/CustomWidgets/DisableableWidget.cs b/CustomWidgets/DisableableWidget.cs index 6b62297f8..ba1bd8d0e 100644 --- a/CustomWidgets/DisableableWidget.cs +++ b/CustomWidgets/DisableableWidget.cs @@ -26,7 +26,7 @@ namespace MatterHackers.MatterControl.CustomWidgets public void SetEnableLevel(EnableLevel enabledLevel) { - disableOverlay.BackgroundColor = new RGBA_Bytes(ActiveTheme.Instance.PrimaryAccentColor, 160); + disableOverlay.BackgroundColor = new RGBA_Bytes(ActiveTheme.Instance.PrimaryBackgroundColor, 160); switch (enabledLevel) { case EnableLevel.Disabled: diff --git a/PrinterControls/ManualPrinterControls.cs b/PrinterControls/ManualPrinterControls.cs index 8a043f27c..38f0d7772 100644 --- a/PrinterControls/ManualPrinterControls.cs +++ b/PrinterControls/ManualPrinterControls.cs @@ -689,7 +689,7 @@ namespace MatterHackers.MatterControl private void SetDisplayAttributes() { - this.BackgroundColor = ActiveTheme.Instance.PrimaryAccentColor; + this.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor; this.textImageButtonFactory.normalFillColor = RGBA_Bytes.White; this.textImageButtonFactory.disabledFillColor = RGBA_Bytes.White; diff --git a/WidescreenPanel.cs b/WidescreenPanel.cs index abb5bf153..37cfb6417 100644 --- a/WidescreenPanel.cs +++ b/WidescreenPanel.cs @@ -49,7 +49,7 @@ using MatterHackers.Localizations; using MatterHackers.MatterControl.PartPreviewWindow; namespace MatterHackers.MatterControl -{ +{ public class WidescreenPanel : FlowLayoutWidget { static WidescreenPanel globalInstance; @@ -70,6 +70,9 @@ namespace MatterHackers.MatterControl View3DTransformPart part3DView; GcodeViewBasic partGcodeView; + GuiWidget RightBorderLine; + GuiWidget LeftBorderLine; + public WidescreenPanel() : base(FlowDirection.LeftToRight) { @@ -77,7 +80,8 @@ namespace MatterHackers.MatterControl { //PrintQueueControl.Instance.Initialize(); - BackgroundColor = RGBA_Bytes.Gray; + BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor; + Padding = new BorderDouble(4); ColumnOne = new FlowLayoutWidget(FlowDirection.TopToBottom); ColumnTwo = new FlowLayoutWidget(FlowDirection.TopToBottom); @@ -89,10 +93,12 @@ namespace MatterHackers.MatterControl ColumnOne.AddChild(new QueueTab()); ColumnOne.Width = 480; //Ordering here matters - must go after children are added - ColumnOne.Padding = new BorderDouble(4); - ColumnTwo.Padding = new BorderDouble(4); - ColumnThree.Padding = new BorderDouble(4); - + //ColumnOne.Padding = new BorderDouble(4); + //ColumnTwo.Padding = new BorderDouble(4, 0); + //ColumnThree.Padding = new BorderDouble(4); + + LeftBorderLine = CreateBorderLine(); + RightBorderLine = CreateBorderLine(); LoadColumnTwo(); @@ -106,7 +112,9 @@ namespace MatterHackers.MatterControl } AddChild(ColumnOne); + AddChild(LeftBorderLine); AddChild(ColumnTwo); + AddChild(RightBorderLine); AddChild(ColumnThree); } @@ -116,6 +124,15 @@ namespace MatterHackers.MatterControl } + private static GuiWidget CreateBorderLine() + { + GuiWidget topLine = new GuiWidget(3, 1); + topLine.BackgroundColor = new RGBA_Bytes(200,200,200); + topLine.VAnchor = VAnchor.ParentBottomTop; + topLine.Margin = new BorderDouble(8, 0); + return topLine; + } + void onBoundsChanges(Object sender, EventArgs e) { SetVisibleStatus(); @@ -188,7 +205,7 @@ namespace MatterHackers.MatterControl TabControl CreateNewAdvancedControlsTab(SliceSettingsWidget.UiState sliceSettingsUiState) { advancedControls = new TabControl(); - advancedControls.BackgroundColor = ActiveTheme.Instance.PrimaryAccentColor; + advancedControls.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor; advancedControls.TabBar.BorderColor = RGBA_Bytes.White; advancedControls.TabBar.Margin = new BorderDouble(0, 0); advancedControls.TabBar.Padding = new BorderDouble(0, 2); @@ -258,33 +275,53 @@ namespace MatterHackers.MatterControl ColumnThree.Visible = false; ColumnTwo.Visible = false; + ColumnOne.RemoveAllChildren(); + ColumnOne.AddChild(new ActionBarPlus()); + ColumnOne.AddChild(new MainSlide()); ColumnOne.AnchorAll(); ColumnOne.Visible = true; + LeftBorderLine.Visible = false; + RightBorderLine.Visible = false; + } else if (this.Width < ColumnTwoMinWidth) { ColumnThree.Visible = true; ColumnTwo.Visible = false; + ColumnOne.RemoveAllChildren(); + ColumnOne.AddChild(new ActionBarPlus()); + ColumnOne.AddChild(new PrintProgressBar()); + ColumnOne.AddChild(new QueueTab()); ColumnOne.AnchorAll(); ColumnOne.Visible = true; + + LeftBorderLine.Visible = true; + RightBorderLine.Visible = false; } else { ColumnThree.Visible = true; ColumnTwo.Visible = true; + ColumnOne.RemoveAllChildren(); + ColumnOne.AddChild(new ActionBarPlus()); + ColumnOne.AddChild(new PrintProgressBar()); + ColumnOne.AddChild(new QueueTab()); ColumnOne.HAnchor = Agg.UI.HAnchor.None; ColumnOne.Width = 480; ColumnOne.Visible = true; + + LeftBorderLine.Visible = true; + RightBorderLine.Visible = true; } } private void onThemeChanged(object sender, EventArgs e) { - this.advancedControls.BackgroundColor = ActiveTheme.Instance.PrimaryAccentColor; + //this.advancedControls.BackgroundColor = ActiveTheme.Instance.PrimaryAccentColor; this.advancedControls.Invalidate(); }