diff --git a/AboutPage/ContactForm.cs b/AboutPage/ContactForm.cs index 03aa5b526..5c7b5f7fc 100644 --- a/AboutPage/ContactForm.cs +++ b/AboutPage/ContactForm.cs @@ -300,7 +300,7 @@ namespace MatterHackers.MatterControl.ContactForm textImageButtonFactory.disabledTextColor = ActiveTheme.Instance.PrimaryTextColor; textImageButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor; - whiteButtonFactory.FixedWidth = 138; + whiteButtonFactory.FixedWidth = 138 * TextWidget.GlobalPointSizeScaleRatio; whiteButtonFactory.normalFillColor = RGBA_Bytes.White; whiteButtonFactory.normalTextColor = RGBA_Bytes.Black; whiteButtonFactory.hoverTextColor = RGBA_Bytes.Black; diff --git a/ConfigurationPage/SettingsViewBase.cs b/ConfigurationPage/SettingsViewBase.cs index 2af0d2457..5a769bc6c 100644 --- a/ConfigurationPage/SettingsViewBase.cs +++ b/ConfigurationPage/SettingsViewBase.cs @@ -17,7 +17,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage { public class SettingsViewBase : AltGroupBox { - protected readonly int TallButtonHeight = 25; + protected readonly int TallButtonHeight = (int)(25 * TextWidget.GlobalPointSizeScaleRatio + .5); protected TextImageButtonFactory textImageButtonFactory = new TextImageButtonFactory(); protected LinkButtonFactory linkButtonFactory = new LinkButtonFactory(); protected RGBA_Bytes separatorLineColor; diff --git a/ControlElements/SplitButtonFactory.cs b/ControlElements/SplitButtonFactory.cs index 8dc8b8b75..c896d8c84 100644 --- a/ControlElements/SplitButtonFactory.cs +++ b/ControlElements/SplitButtonFactory.cs @@ -29,7 +29,7 @@ namespace MatterHackers.MatterControl public bool AllowThemeToAdjustImage = true; private string imageName; - public double FixedHeight = 30; + public double FixedHeight = 30 * TextWidget.GlobalPointSizeScaleRatio; public SplitButtonFactory () { diff --git a/ControlElements/StyledMessageBoxWindow.cs b/ControlElements/StyledMessageBoxWindow.cs index b23809197..ac85bc90a 100644 --- a/ControlElements/StyledMessageBoxWindow.cs +++ b/ControlElements/StyledMessageBoxWindow.cs @@ -95,7 +95,7 @@ namespace MatterHackers.MatterControl buttonRow.Padding = new BorderDouble(0, 3); } - int minButtonWidth = 50; + int minButtonWidth = (int)(50 * TextWidget.GlobalPointSizeScaleRatio + .5); switch (messageType) { diff --git a/CustomWidgets/SplitButton.cs b/CustomWidgets/SplitButton.cs index 9e9bcba41..5d85acb20 100644 --- a/CustomWidgets/SplitButton.cs +++ b/CustomWidgets/SplitButton.cs @@ -56,7 +56,7 @@ namespace MatterHackers.MatterControl private Button CreateDefaultButton(string buttonText) { TextImageButtonFactory buttonFactory = new TextImageButtonFactory (); - buttonFactory.FixedHeight = 30; + buttonFactory.FixedHeight = 30 * TextWidget.GlobalPointSizeScaleRatio; buttonFactory.normalFillColor = RGBA_Bytes.White; buttonFactory.normalTextColor = RGBA_Bytes.Black; buttonFactory.hoverTextColor = RGBA_Bytes.Black; diff --git a/CustomWidgets/WizardControl.cs b/CustomWidgets/WizardControl.cs index c06fff39f..725aac176 100644 --- a/CustomWidgets/WizardControl.cs +++ b/CustomWidgets/WizardControl.cs @@ -92,7 +92,7 @@ namespace MatterHackers.MatterControl buttonBar.HAnchor = Agg.UI.HAnchor.ParentLeftRight; buttonBar.Padding = new BorderDouble(0, 3); - textImageButtonFactory.FixedWidth = 60; + textImageButtonFactory.FixedWidth = 60 * TextWidget.GlobalPointSizeScaleRatio; backButton = textImageButtonFactory.Generate(LocalizedString.Get("Back"), centerText: true); backButton.Click += new EventHandler(back_Click); diff --git a/PartPreviewWindow/View3D/View3DWidget.cs b/PartPreviewWindow/View3D/View3DWidget.cs index 67102915c..9ae423527 100644 --- a/PartPreviewWindow/View3D/View3DWidget.cs +++ b/PartPreviewWindow/View3D/View3DWidget.cs @@ -1241,7 +1241,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow return true; }); SplitButtonFactory splitButtonFactory = new SplitButtonFactory(); - splitButtonFactory.FixedHeight = 40; + splitButtonFactory.FixedHeight = 40 * TextWidget.GlobalPointSizeScaleRatio; saveButtons = splitButtonFactory.Generate(buttonList, Direction.Up,imageName:"icon_save_32x32.png"); saveButtons.Visible = false; @@ -1262,7 +1262,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow //Create Save Button double oldWidth = whiteButtonFactory.FixedWidth; - whiteButtonFactory.FixedWidth = 56; + whiteButtonFactory.FixedWidth = 56 * TextWidget.GlobalPointSizeScaleRatio; Button saveButton = whiteButtonFactory.Generate("Save".Localize(), centerText: true); saveButton.Cursor = Cursors.Hand; saveButtons.AddChild(saveButton); diff --git a/PartPreviewWindow/ViewGcodeBasic.cs b/PartPreviewWindow/ViewGcodeBasic.cs index 7646ecfb0..434f6903f 100644 --- a/PartPreviewWindow/ViewGcodeBasic.cs +++ b/PartPreviewWindow/ViewGcodeBasic.cs @@ -400,7 +400,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow buttonPanel.CloseAndRemoveAllChildren(); double oldWidth = textImageButtonFactory.FixedWidth; - textImageButtonFactory.FixedWidth = 44; + textImageButtonFactory.FixedWidth = 44 * TextWidget.GlobalPointSizeScaleRatio; FlowLayoutWidget modelInfoContainer = new FlowLayoutWidget(FlowDirection.TopToBottom); modelInfoContainer.HAnchor = HAnchor.ParentLeftRight; @@ -495,7 +495,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow private void AddLayerInfo(FlowLayoutWidget buttonPanel) { double oldWidth = textImageButtonFactory.FixedWidth; - textImageButtonFactory.FixedWidth = 44; + textImageButtonFactory.FixedWidth = 44 * TextWidget.GlobalPointSizeScaleRatio; FlowLayoutWidget layerInfoContainer = new FlowLayoutWidget(FlowDirection.TopToBottom); layerInfoContainer.HAnchor = HAnchor.ParentLeftRight; @@ -520,8 +520,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow { buttonPanel.CloseAndRemoveAllChildren(); - double oldWidth = textImageButtonFactory.FixedWidth; - textImageButtonFactory.FixedWidth = 44; + double oldWidth = textImageButtonFactory.FixedWidth; + textImageButtonFactory.FixedWidth = 44 * TextWidget.GlobalPointSizeScaleRatio; FlowLayoutWidget layerInfoContainer = new FlowLayoutWidget(FlowDirection.TopToBottom); layerInfoContainer.HAnchor = HAnchor.ParentLeftRight; diff --git a/PrintLibrary/PrintLibraryWidget.cs b/PrintLibrary/PrintLibraryWidget.cs index b17fe55d4..3d4e0eebb 100644 --- a/PrintLibrary/PrintLibraryWidget.cs +++ b/PrintLibrary/PrintLibraryWidget.cs @@ -77,14 +77,14 @@ namespace MatterHackers.MatterControl.PrintLibrary searchButtonFactory.disabledTextColor = RGBA_Bytes.White; searchButtonFactory.pressedTextColor = RGBA_Bytes.White; searchButtonFactory.borderWidth = 0; - searchButtonFactory.FixedWidth = 80; + searchButtonFactory.FixedWidth = 80 * TextWidget.GlobalPointSizeScaleRatio; editButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor; editButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor; editButtonFactory.disabledTextColor = ActiveTheme.Instance.PrimaryTextColor; editButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor; editButtonFactory.borderWidth = 0; - editButtonFactory.FixedWidth = 70; + editButtonFactory.FixedWidth = 70 * TextWidget.GlobalPointSizeScaleRatio; FlowLayoutWidget allControls = new FlowLayoutWidget(FlowDirection.TopToBottom); { diff --git a/PrintQueue/QueueDataWidget.cs b/PrintQueue/QueueDataWidget.cs index d8a57dff6..fa9190f17 100644 --- a/PrintQueue/QueueDataWidget.cs +++ b/PrintQueue/QueueDataWidget.cs @@ -85,7 +85,7 @@ namespace MatterHackers.MatterControl.PrintQueue editButtonFactory.disabledTextColor = ActiveTheme.Instance.PrimaryTextColor; editButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor; editButtonFactory.borderWidth = 0; - editButtonFactory.FixedWidth = 70; + editButtonFactory.FixedWidth = 70 * TextWidget.GlobalPointSizeScaleRatio; FlowLayoutWidget allControls = new FlowLayoutWidget(FlowDirection.TopToBottom); { diff --git a/PrinterControls/ControlWidgets/MacroControls.cs b/PrinterControls/ControlWidgets/MacroControls.cs index f8af59eb9..a4d37e054 100644 --- a/PrinterControls/ControlWidgets/MacroControls.cs +++ b/PrinterControls/ControlWidgets/MacroControls.cs @@ -66,8 +66,8 @@ namespace MatterHackers.MatterControl.PrinterControls void SetDisplayAttributes() { - this.textImageButtonFactory.normalFillColor = RGBA_Bytes.White; - this.textImageButtonFactory.FixedHeight = 24; + this.textImageButtonFactory.normalFillColor = RGBA_Bytes.White; + this.textImageButtonFactory.FixedHeight = 24 * TextWidget.GlobalPointSizeScaleRatio; this.textImageButtonFactory.fontSize = 12; this.textImageButtonFactory.borderWidth = 1; this.textImageButtonFactory.normalBorderColor = new RGBA_Bytes(ActiveTheme.Instance.PrimaryTextColor, 200); diff --git a/PrinterControls/EditLevelingSettingsWindow.cs b/PrinterControls/EditLevelingSettingsWindow.cs index fad63f475..759d699e1 100644 --- a/PrinterControls/EditLevelingSettingsWindow.cs +++ b/PrinterControls/EditLevelingSettingsWindow.cs @@ -90,7 +90,7 @@ namespace MatterHackers.MatterControl BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor; double oldHeight = textImageButtonFactory.FixedHeight; - textImageButtonFactory.FixedHeight = 30; + textImageButtonFactory.FixedHeight = 30 * TextWidget.GlobalPointSizeScaleRatio; // put in the movement edit controls PrintLevelingData levelingData = PrintLevelingData.GetForPrinter(ActivePrinterProfile.Instance.ActivePrinter); diff --git a/PrinterControls/EditManualMovementSpeedsWindow.cs b/PrinterControls/EditManualMovementSpeedsWindow.cs index e159eb815..61459fdd2 100644 --- a/PrinterControls/EditManualMovementSpeedsWindow.cs +++ b/PrinterControls/EditManualMovementSpeedsWindow.cs @@ -91,7 +91,7 @@ namespace MatterHackers.MatterControl BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor; double oldHeight = textImageButtonFactory.FixedHeight; - textImageButtonFactory.FixedHeight = 30; + textImageButtonFactory.FixedHeight = 30 * TextWidget.GlobalPointSizeScaleRatio; TextWidget tempTypeLabel = new TextWidget(windowTitle, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 10); tempTypeLabel.Margin = new BorderDouble(3); diff --git a/PrinterControls/EditTemperaturePresetsWindow.cs b/PrinterControls/EditTemperaturePresetsWindow.cs index e640c11f5..c0a1747bd 100644 --- a/PrinterControls/EditTemperaturePresetsWindow.cs +++ b/PrinterControls/EditTemperaturePresetsWindow.cs @@ -93,7 +93,7 @@ namespace MatterHackers.MatterControl BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor; double oldHeight = textImageButtonFactory.FixedHeight; - textImageButtonFactory.FixedHeight = 30; + textImageButtonFactory.FixedHeight = 30 * TextWidget.GlobalPointSizeScaleRatio; TextWidget tempTypeLabel = new TextWidget(windowTitle, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 10); tempTypeLabel.Margin = new BorderDouble(3); diff --git a/PrinterControls/PrinterConnections/ChooseConnectionWidget.cs b/PrinterControls/PrinterConnections/ChooseConnectionWidget.cs index 3c4939d21..4f5e493f4 100644 --- a/PrinterControls/PrinterConnections/ChooseConnectionWidget.cs +++ b/PrinterControls/PrinterConnections/ChooseConnectionWidget.cs @@ -64,7 +64,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections editButtonFactory.disabledTextColor = ActiveTheme.Instance.SecondaryAccentColor; editButtonFactory.pressedTextColor = RGBA_Bytes.White; editButtonFactory.borderWidth = 0; - editButtonFactory.FixedWidth = 60; + editButtonFactory.FixedWidth = 60 * TextWidget.GlobalPointSizeScaleRatio; this.AnchorAll(); this.BackgroundColor = ActiveTheme.Instance.SecondaryBackgroundColor; diff --git a/PrinterControls/XYZJogControls.cs b/PrinterControls/XYZJogControls.cs index 2e3ddb618..0d4a3b555 100644 --- a/PrinterControls/XYZJogControls.cs +++ b/PrinterControls/XYZJogControls.cs @@ -95,8 +95,8 @@ namespace MatterHackers.MatterControl { TextImageButtonFactory buttonFactory = new TextImageButtonFactory(); - buttonFactory.FixedHeight = 20; - buttonFactory.FixedWidth = 30; + buttonFactory.FixedHeight = 20 * TextWidget.GlobalPointSizeScaleRatio; + buttonFactory.FixedWidth = 30 * TextWidget.GlobalPointSizeScaleRatio; buttonFactory.fontSize = 8; buttonFactory.Margin = new BorderDouble(0); buttonFactory.checkedBorderColor = ActiveTheme.Instance.PrimaryTextColor; @@ -281,8 +281,8 @@ namespace MatterHackers.MatterControl { TextImageButtonFactory buttonFactory = new TextImageButtonFactory(); - buttonFactory.FixedHeight = 20; - buttonFactory.FixedWidth = 30; + buttonFactory.FixedHeight = 20 * TextWidget.GlobalPointSizeScaleRatio; + buttonFactory.FixedWidth = 30 * TextWidget.GlobalPointSizeScaleRatio; buttonFactory.fontSize = 8; buttonFactory.Margin = new BorderDouble(0); buttonFactory.checkedBorderColor = ActiveTheme.Instance.PrimaryTextColor; diff --git a/SlicerConfiguration/SliceSettingsWidget.cs b/SlicerConfiguration/SliceSettingsWidget.cs index 7e124fe44..99fd9d104 100644 --- a/SlicerConfiguration/SliceSettingsWidget.cs +++ b/SlicerConfiguration/SliceSettingsWidget.cs @@ -277,7 +277,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration public SliceSettingsWidget(SliceSettingsWidgetUiState uiState) { int minSettingNameWidth = (int)(190 * TextWidget.GlobalPointSizeScaleRatio + .5); - buttonFactory.FixedHeight = 20; + buttonFactory.FixedHeight = 20 * TextWidget.GlobalPointSizeScaleRatio; buttonFactory.fontSize = 10; buttonFactory.normalFillColor = RGBA_Bytes.White; buttonFactory.normalTextColor = RGBA_Bytes.DarkGray;