From c9ffc3eb98f05a2fad31aad8badce7028852d71d Mon Sep 17 00:00:00 2001 From: larsbrubaker Date: Sat, 30 Aug 2014 13:28:13 -0700 Subject: [PATCH] Made fixed width and height in button factory doubles. --- ControlElements/TextImageButtonFactory.cs | 4 ++-- PartPreviewWindow/ViewGcodeBasic.cs | 6 +++--- PrinterControls/EditLevelingSettingsWindow.cs | 2 +- PrinterControls/EditManualMovementSpeedsWindow.cs | 2 +- PrinterControls/EditTemperaturePresetsWindow.cs | 2 +- StaticData/Translations/Master.txt | 3 +++ 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ControlElements/TextImageButtonFactory.cs b/ControlElements/TextImageButtonFactory.cs index 25bbcc698..db67b495c 100644 --- a/ControlElements/TextImageButtonFactory.cs +++ b/ControlElements/TextImageButtonFactory.cs @@ -150,8 +150,8 @@ namespace MatterHackers.MatterControl public bool invertImageLocation = false; public bool AllowThemeToAdjustImage = true; FlowDirection flowDirection; - public int FixedWidth = 0; - public int FixedHeight = 40; + public double FixedWidth = 0; + public double FixedHeight = 40; public TooltipButton GenerateTooltipButton(string label, string normalImageName = null, string hoverImageName = null, string pressedImageName = null, string disabledImageName = null) { diff --git a/PartPreviewWindow/ViewGcodeBasic.cs b/PartPreviewWindow/ViewGcodeBasic.cs index f8ae3a81f..b020f9d00 100644 --- a/PartPreviewWindow/ViewGcodeBasic.cs +++ b/PartPreviewWindow/ViewGcodeBasic.cs @@ -350,7 +350,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow private void AddModelInfo(FlowLayoutWidget buttonPanel) { - int oldWidth = textImageButtonFactory.FixedWidth; + double oldWidth = textImageButtonFactory.FixedWidth; textImageButtonFactory.FixedWidth = 44; FlowLayoutWidget modelInfoContainer = new FlowLayoutWidget(FlowDirection.TopToBottom); @@ -445,7 +445,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow private void AddLayerInfo(FlowLayoutWidget buttonPanel) { - int oldWidth = textImageButtonFactory.FixedWidth; + double oldWidth = textImageButtonFactory.FixedWidth; textImageButtonFactory.FixedWidth = 44; FlowLayoutWidget layerInfoContainer = new FlowLayoutWidget(FlowDirection.TopToBottom); @@ -469,7 +469,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow private void AddDisplayControls(FlowLayoutWidget buttonPanel) { - int oldWidth = textImageButtonFactory.FixedWidth; + double oldWidth = textImageButtonFactory.FixedWidth; textImageButtonFactory.FixedWidth = 44; FlowLayoutWidget layerInfoContainer = new FlowLayoutWidget(FlowDirection.TopToBottom); diff --git a/PrinterControls/EditLevelingSettingsWindow.cs b/PrinterControls/EditLevelingSettingsWindow.cs index c1b1256f1..c5770fdc5 100644 --- a/PrinterControls/EditLevelingSettingsWindow.cs +++ b/PrinterControls/EditLevelingSettingsWindow.cs @@ -89,7 +89,7 @@ namespace MatterHackers.MatterControl BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor; - int oldHeight = textImageButtonFactory.FixedHeight; + double oldHeight = textImageButtonFactory.FixedHeight; textImageButtonFactory.FixedHeight = 30; // put in the movement edit controls diff --git a/PrinterControls/EditManualMovementSpeedsWindow.cs b/PrinterControls/EditManualMovementSpeedsWindow.cs index 0ff73b7c1..5c1ed4e64 100644 --- a/PrinterControls/EditManualMovementSpeedsWindow.cs +++ b/PrinterControls/EditManualMovementSpeedsWindow.cs @@ -89,7 +89,7 @@ namespace MatterHackers.MatterControl this.functionToCallOnSave = functionToCallOnSave; BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor; - int oldHeight = textImageButtonFactory.FixedHeight; + double oldHeight = textImageButtonFactory.FixedHeight; textImageButtonFactory.FixedHeight = 30; TextWidget tempTypeLabel = new TextWidget(windowTitle, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 10); diff --git a/PrinterControls/EditTemperaturePresetsWindow.cs b/PrinterControls/EditTemperaturePresetsWindow.cs index 20ec2e3a4..73d2eca9b 100644 --- a/PrinterControls/EditTemperaturePresetsWindow.cs +++ b/PrinterControls/EditTemperaturePresetsWindow.cs @@ -91,7 +91,7 @@ namespace MatterHackers.MatterControl this.functionToCallOnSave = functionToCallOnSave; BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor; - int oldHeight = textImageButtonFactory.FixedHeight; + double oldHeight = textImageButtonFactory.FixedHeight; textImageButtonFactory.FixedHeight = 30; TextWidget tempTypeLabel = new TextWidget(windowTitle, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 10); diff --git a/StaticData/Translations/Master.txt b/StaticData/Translations/Master.txt index 6b45bd4ba..44489a27b 100644 --- a/StaticData/Translations/Master.txt +++ b/StaticData/Translations/Master.txt @@ -2564,3 +2564,6 @@ Translated:Z Can Be Negative English:Export as X3G Translated:Export as X3G +English:Select an Image +Translated:Select an Image +