diff --git a/ApplicationView/MainApplicationWidget.cs b/ApplicationView/MainApplicationWidget.cs index f8ac87808..02109e13b 100644 --- a/ApplicationView/MainApplicationWidget.cs +++ b/ApplicationView/MainApplicationWidget.cs @@ -73,14 +73,6 @@ namespace MatterHackers.MatterControl container.AnchorAll(); GuiWidget.TouchScreenMode = UserSettings.Instance.IsTouchScreen; - if (!UserSettings.Instance.IsTouchScreen) - { -#if false // !__ANDROID__ - // The application menu bar, which is suppressed on Android - var menuRow = new ApplicationMenuRow(); - container.AddChild(menuRow); -#endif - } container.AddChild(new HorizontalLine(alpha:50)); diff --git a/ApplicationView/ThemeConfig.cs b/ApplicationView/ThemeConfig.cs index 2cb08c1d8..19263dbd4 100644 --- a/ApplicationView/ThemeConfig.cs +++ b/ApplicationView/ThemeConfig.cs @@ -225,13 +225,11 @@ namespace MatterHackers.MatterControl NormalFillColor = Color.Gray }); - int viewControlsButtonHeight = (UserSettings.Instance.IsTouchScreen) ? 40 : 0; - this.ViewControlsButtonFactory = new TextImageButtonFactory(new ButtonFactoryOptions(commonOptions) { DisabledTextColor = theme.PrimaryTextColor, - FixedHeight = viewControlsButtonHeight, - FixedWidth = viewControlsButtonHeight, + FixedHeight = 0, + FixedWidth = 0, AllowThemeToAdjustImage = false, CheckedBorderColor = Color.White }); @@ -256,16 +254,9 @@ namespace MatterHackers.MatterControl }); #region PartPreviewWidget - if (UserSettings.Instance.IsTouchScreen) - { - sideBarButtonWidth = 180; - shortButtonHeight = 40; - } - else - { - sideBarButtonWidth = 138; - shortButtonHeight = 30; - } + + sideBarButtonWidth = 138; + shortButtonHeight = 30; WhiteButtonFactory = new TextImageButtonFactory(new ButtonFactoryOptions(commonOptions) { @@ -465,10 +456,6 @@ namespace MatterHackers.MatterControl public SolidSlider CreateSolidSlider(GuiWidget wordOptionContainer, string header, double min = 0, double max = .5) { double scrollBarWidth = 10; - if (UserSettings.Instance.IsTouchScreen) - { - scrollBarWidth = 20; - } wordOptionContainer.AddChild(new TextWidget(header, textColor: ActiveTheme.Instance.PrimaryTextColor) { diff --git a/ConfigurationPage/PrintLeveling/InstructionsPage.cs b/ConfigurationPage/PrintLeveling/InstructionsPage.cs index 97aa45035..d0f9ead83 100644 --- a/ConfigurationPage/PrintLeveling/InstructionsPage.cs +++ b/ConfigurationPage/PrintLeveling/InstructionsPage.cs @@ -35,7 +35,6 @@ namespace MatterHackers.MatterControl { public class InstructionsPage : WizardControlPage { - double extraTextScaling = 1; protected FlowLayoutWidget topToBottomControls; protected PrinterConfig printer { get; } @@ -45,15 +44,10 @@ namespace MatterHackers.MatterControl { this.printer = printer; - if (UserSettings.Instance.IsTouchScreen) - { - extraTextScaling = 1.33333; - } - topToBottomControls = new FlowLayoutWidget(FlowDirection.TopToBottom); topToBottomControls.Padding = new BorderDouble(3); - topToBottomControls.HAnchor |= Agg.UI.HAnchor.Left; - topToBottomControls.VAnchor |= Agg.UI.VAnchor.Top; + topToBottomControls.HAnchor |= HAnchor.Left; + topToBottomControls.VAnchor |= VAnchor.Top; AddTextField(instructionsText, 10); @@ -70,9 +64,12 @@ namespace MatterHackers.MatterControl EnglishTextWrapping wrapper = new EnglishTextWrapping(12); string wrappedInstructions = wrapper.InsertCRs(instructionsText, 400); string wrappedInstructionsTabsToSpaces = wrappedInstructions.Replace("\t", " "); - TextWidget instructionsWidget = new TextWidget(wrappedInstructionsTabsToSpaces, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 12 * extraTextScaling); - instructionsWidget.HAnchor = Agg.UI.HAnchor.Left; - topToBottomControls.AddChild(instructionsWidget); + + topToBottomControls.AddChild( + new TextWidget(wrappedInstructionsTabsToSpaces, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 12 * GuiWidget.DeviceScale) + { + HAnchor = HAnchor.Left + }); } } } \ No newline at end of file diff --git a/ControlElements/StyledMessageBoxWindow.cs b/ControlElements/StyledMessageBoxWindow.cs index a5f9a4cc7..f2beacf03 100644 --- a/ControlElements/StyledMessageBoxWindow.cs +++ b/ControlElements/StyledMessageBoxWindow.cs @@ -60,8 +60,6 @@ namespace MatterHackers.MatterControl private TextWidget messageContainer; private Action responseCallback; - private double extraTextScaling = (UserSettings.Instance.IsTouchScreen) ? 1.33333 : 1; - public MessageBoxPage(Action callback, string message, string caption, MessageType messageType, GuiWidget[] extraWidgetsToAdd, double width, double height, string yesOk, string noCancel, ThemeConfig theme) : base((noCancel == "") ? "No".Localize() : noCancel) { @@ -78,7 +76,7 @@ namespace MatterHackers.MatterControl responseCallback = callback; unwrappedMessage = message; - contentRow.AddChild(messageContainer = new TextWidget(message, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 12 * extraTextScaling) + contentRow.AddChild(messageContainer = new TextWidget(message, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 12 * DeviceScale) { AutoExpandBoundsToText = true, HAnchor = HAnchor.Left @@ -137,7 +135,7 @@ namespace MatterHackers.MatterControl double wrappingSize = contentRow.Width - (contentRow.Padding.Width + messageContainer.Margin.Width); if (wrappingSize > 0) { - var wrapper = new EnglishTextWrapping(12 * extraTextScaling * GuiWidget.DeviceScale); + var wrapper = new EnglishTextWrapping(12 * GuiWidget.DeviceScale); messageContainer.Text = wrapper.InsertCRs(unwrappedMessage, wrappingSize); } } diff --git a/CustomWidgets/WizardControl.cs b/CustomWidgets/WizardControl.cs index 3a38a0c14..32281dc93 100644 --- a/CustomWidgets/WizardControl.cs +++ b/CustomWidgets/WizardControl.cs @@ -53,15 +53,7 @@ namespace MatterHackers.MatterControl FlowLayoutWidget topToBottom = new FlowLayoutWidget(FlowDirection.TopToBottom); topToBottom.AnchorAll(); - - if (UserSettings.Instance.IsTouchScreen) - { - topToBottom.Padding = new BorderDouble(12); - } - else - { - topToBottom.Padding = new BorderDouble(3, 0, 3, 5); - } + topToBottom.Padding = new BorderDouble(3, 0, 3, 5); FlowLayoutWidget headerRow = new FlowLayoutWidget(FlowDirection.LeftToRight); headerRow.HAnchor = HAnchor.Stretch; diff --git a/MatterControlApplication.cs b/MatterControlApplication.cs index 17eaf0ae3..1bd9bc9fb 100644 --- a/MatterControlApplication.cs +++ b/MatterControlApplication.cs @@ -184,6 +184,7 @@ namespace MatterHackers.MatterControl GuiWidget.DeviceScale = 1.3; SystemWindow.ShareSingleOsWindow = true; } + string textSizeMode = UserSettings.Instance.get(UserSettingsKey.ApplicationTextSize); if (!string.IsNullOrEmpty(textSizeMode)) { diff --git a/PartPreviewWindow/SliceLayerSelector.cs b/PartPreviewWindow/SliceLayerSelector.cs index 647917686..632d6e2a2 100644 --- a/PartPreviewWindow/SliceLayerSelector.cs +++ b/PartPreviewWindow/SliceLayerSelector.cs @@ -37,7 +37,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow { public class SliceLayerSelector : GuiWidget { - public static int SliderWidth { get; } = (UserSettings.Instance.IsTouchScreen) ? 20 : 10; + public static int SliderWidth { get; } = 10; private InlineEditControl currentLayerInfo; diff --git a/PrinterControls/ControlWidgets/AdjustmentControls.cs b/PrinterControls/ControlWidgets/AdjustmentControls.cs index 6f6427036..b00fb421f 100644 --- a/PrinterControls/ControlWidgets/AdjustmentControls.cs +++ b/PrinterControls/ControlWidgets/AdjustmentControls.cs @@ -64,10 +64,6 @@ namespace MatterHackers.MatterControl.PrinterControls double sliderWidth = 300 * GuiWidget.DeviceScale; double sliderThumbWidth = 10 * GuiWidget.DeviceScale; - if (UserSettings.Instance.IsTouchScreen) - { - sliderThumbWidth = 15 * GuiWidget.DeviceScale; - } { var row = new FlowLayoutWidget() diff --git a/SetupWizard/DialogPage.cs b/SetupWizard/DialogPage.cs index 85f7692f6..235fbc512 100644 --- a/SetupWizard/DialogPage.cs +++ b/SetupWizard/DialogPage.cs @@ -65,7 +65,6 @@ namespace MatterHackers.MatterControl if (!UserSettings.Instance.IsTouchScreen) { - this.BackgroundColor = ActiveTheme.Instance.SecondaryBackgroundColor; this.Padding = new BorderDouble(0); //To be re-enabled once native borders are turned off } @@ -117,16 +116,13 @@ namespace MatterHackers.MatterControl mainContainer.AddChild(contentRow); mainContainer.AddChild(footerRow); - if (!UserSettings.Instance.IsTouchScreen) - { - mainContainer.Padding = new BorderDouble(3, 5, 3, 5); - headerRow.Padding = new BorderDouble(0, 3, 0, 3); + mainContainer.Padding = new BorderDouble(3, 5, 3, 5); + headerRow.Padding = new BorderDouble(0, 3, 0, 3); - headerLabel.TextWidget.PointSize = 14; - headerLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor; - contentRow.Padding = new BorderDouble(5); - footerRow.Margin = new BorderDouble(0, 3); - } + headerLabel.TextWidget.PointSize = 14; + headerLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor; + contentRow.Padding = new BorderDouble(5); + footerRow.Margin = new BorderDouble(0, 3); this.AddChild(mainContainer); }