From 1a91cbc5c8f2b25830921a8c9caaf16ce1ee8f00 Mon Sep 17 00:00:00 2001 From: John Lewin Date: Fri, 12 Jan 2018 14:05:04 -0800 Subject: [PATCH] Use theme default font size --- .../CalibrationControls.cs | 3 +-- CustomWidgets/ConfigurePrinterWidget.cs | 3 ++- CustomWidgets/DockingTabControl.cs | 2 +- CustomWidgets/PrintingWindow/ZAxisControls.cs | 2 +- .../TerminalWindow/TerminalWidget.cs | 4 ++-- PrinterControls/XYZJogControls.cs | 19 ++++++++++++------- SlicerConfiguration/SliceSettingsWidget.cs | 5 +++-- Submodules/agg-sharp | 2 +- 8 files changed, 23 insertions(+), 17 deletions(-) diff --git a/ConfigurationPage/CalibrationSettings/CalibrationControls.cs b/ConfigurationPage/CalibrationSettings/CalibrationControls.cs index 1a7aa471e..0b2602518 100644 --- a/ConfigurationPage/CalibrationSettings/CalibrationControls.cs +++ b/ConfigurationPage/CalibrationSettings/CalibrationControls.cs @@ -40,10 +40,9 @@ namespace MatterHackers.MatterControl.PrinterControls // label buttonRow.AddChild( - new TextWidget("") + new TextWidget("", textColor: theme.Colors.PrimaryTextColor, pointSize: theme.DefaultFontSize) { AutoExpandBoundsToText = true, - TextColor = ActiveTheme.Instance.PrimaryTextColor, VAnchor = VAnchor.Center, Text = "Software Print Leveling".Localize() }); diff --git a/CustomWidgets/ConfigurePrinterWidget.cs b/CustomWidgets/ConfigurePrinterWidget.cs index 3458f7af4..26b015304 100644 --- a/CustomWidgets/ConfigurePrinterWidget.cs +++ b/CustomWidgets/ConfigurePrinterWidget.cs @@ -87,7 +87,8 @@ namespace MatterHackers.MatterControl primaryTabControl, scrollable, theme, - hasClose: false) + hasClose: false, + pointSize: theme.DefaultFontSize) { Name = section.Name + " Tab", InactiveTabColor = Color.Transparent, diff --git a/CustomWidgets/DockingTabControl.cs b/CustomWidgets/DockingTabControl.cs index 26243da36..453c8b973 100644 --- a/CustomWidgets/DockingTabControl.cs +++ b/CustomWidgets/DockingTabControl.cs @@ -213,7 +213,7 @@ namespace MatterHackers.MatterControl.CustomWidgets content, theme, hasClose: kvp.Value is ConfigurePrinterWidget, - pointSize: theme.FontSize11) + pointSize: theme.DefaultFontSize) { Name = tabTitle + " Tab", InactiveTabColor = Color.Transparent, diff --git a/CustomWidgets/PrintingWindow/ZAxisControls.cs b/CustomWidgets/PrintingWindow/ZAxisControls.cs index 75348e4d4..f86a73e2c 100644 --- a/CustomWidgets/PrintingWindow/ZAxisControls.cs +++ b/CustomWidgets/PrintingWindow/ZAxisControls.cs @@ -41,7 +41,7 @@ namespace MatterHackers.MatterControl.CustomWidgets { private MoveButtonFactory buttonFactory = new MoveButtonFactory() { - FontSize = 13, + FontSize = ApplicationController.Instance.Theme.DefaultFontSize, }; public ZAxisControls(PrinterConfig printer, ThemeConfig theme, bool smallScreen) : diff --git a/PrinterControls/TerminalWindow/TerminalWidget.cs b/PrinterControls/TerminalWindow/TerminalWidget.cs index 37b55fe96..8a5f8e36d 100644 --- a/PrinterControls/TerminalWindow/TerminalWidget.cs +++ b/PrinterControls/TerminalWindow/TerminalWidget.cs @@ -65,7 +65,7 @@ namespace MatterHackers.MatterControl }; this.AddChild(headerRow); - filterOutput = new CheckBox("Filter Output".Localize()) + filterOutput = new CheckBox("Filter Output".Localize(), textSize: theme.DefaultFontSize) { TextColor = ActiveTheme.Instance.PrimaryTextColor, VAnchor = VAnchor.Bottom, @@ -85,7 +85,7 @@ namespace MatterHackers.MatterControl }; headerRow.AddChild(filterOutput); - autoUppercase = new CheckBox("Auto Uppercase".Localize()) + autoUppercase = new CheckBox("Auto Uppercase".Localize(), textSize: theme.DefaultFontSize) { Margin = new BorderDouble(left: 25), Checked = UserSettings.Instance.Fields.GetBool(UserSettingsKey.TerminalAutoUppercase, true), diff --git a/PrinterControls/XYZJogControls.cs b/PrinterControls/XYZJogControls.cs index 31e3d597f..608430fbf 100644 --- a/PrinterControls/XYZJogControls.cs +++ b/PrinterControls/XYZJogControls.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using MatterHackers.Agg; -using MatterHackers.Agg.ImageProcessing; using MatterHackers.Agg.Platform; using MatterHackers.Agg.UI; using MatterHackers.Agg.VertexSource; @@ -59,7 +58,10 @@ namespace MatterHackers.MatterControl private MoveButton zPlusControl; private MoveButton zMinusControl; - private MoveButtonFactory moveButtonFactory = new MoveButtonFactory(); + private MoveButtonFactory moveButtonFactory = new MoveButtonFactory() + { + FontSize = ApplicationController.Instance.Theme.DefaultFontSize + }; private PrinterConfig printer; public JogControls(PrinterConfig printer, XYZColors colors) @@ -556,7 +558,10 @@ namespace MatterHackers.MatterControl { FlowLayoutWidget zButtons = new FlowLayoutWidget(FlowDirection.TopToBottom); { - MoveButtonFactory moveButtonFactory = new MoveButtonFactory(); + var moveButtonFactory = new MoveButtonFactory() + { + FontSize = ApplicationController.Instance.Theme.DefaultFontSize + }; moveButtonFactory.Colors.Fill.Normal = color; zPlusControl = CreateMoveButton(printer, "Z+", PrinterConnection.Axis.Z, printer.Settings.ZSpeed(), levelingButtons, moveButtonFactory); @@ -805,22 +810,22 @@ namespace MatterHackers.MatterControl { //Create the multi-state button view var buttonViewStates = new ButtonViewStates( - new MoveButtonWidget(label, Colors.Text.Normal) + new MoveButtonWidget(label, Colors.Text.Normal, this.FontSize) { BackgroundColor = Colors.Fill.Normal, BorderWidth = this.BorderWidth }, - new MoveButtonWidget(label, Colors.Text.Hover) + new MoveButtonWidget(label, Colors.Text.Hover, this.FontSize) { BackgroundColor = Colors.Fill.Hover, BorderWidth = this.BorderWidth }, - new MoveButtonWidget(label, Colors.Text.Pressed) + new MoveButtonWidget(label, Colors.Text.Pressed, this.FontSize) { BackgroundColor = Colors.Fill.Pressed, BorderWidth = this.BorderWidth }, - new MoveButtonWidget(label, Colors.Text.Disabled) + new MoveButtonWidget(label, Colors.Text.Disabled, this.FontSize) { BackgroundColor = Colors.Fill.Disabled, BorderWidth = this.BorderWidth diff --git a/SlicerConfiguration/SliceSettingsWidget.cs b/SlicerConfiguration/SliceSettingsWidget.cs index e78bda278..92cc2e237 100644 --- a/SlicerConfiguration/SliceSettingsWidget.cs +++ b/SlicerConfiguration/SliceSettingsWidget.cs @@ -109,7 +109,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration Margin = new BorderDouble(top: 8), VAnchor = VAnchor.Stretch, HAnchor = HAnchor.Stretch, - MinimumSize = new Vector2(200, 200) + MinimumSize = new Vector2(200, 200), }; primaryTabControl.TabBar.BackgroundColor = theme.ActiveTabBarBackground; @@ -130,7 +130,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration primaryTabControl, content, theme, - hasClose: false) + hasClose: false, + pointSize: theme.DefaultFontSize) { Name = category.Name + " Tab", InactiveTabColor = Color.Transparent, diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index f3461d676..62ffc915f 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit f3461d6760b2f460c25d6ef924d5f87f83835876 +Subproject commit 62ffc915f217c8a2232810fb4f567f9b4b1009f3