From 6d3a8535af526a98034a7a70c980578a6f07fe6e Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Fri, 28 Oct 2016 14:11:45 -0700 Subject: [PATCH] Fixed home icon being the wronge size on touch. --- PartPreviewWindow/ViewControls2D.cs | 8 ++++---- PartPreviewWindow/ViewControls3D.cs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/PartPreviewWindow/ViewControls2D.cs b/PartPreviewWindow/ViewControls2D.cs index 17394b0a4..796abcc3b 100644 --- a/PartPreviewWindow/ViewControls2D.cs +++ b/PartPreviewWindow/ViewControls2D.cs @@ -79,8 +79,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow iconTextImageButtonFactory.checkedBorderColor = RGBA_Bytes.White; BackgroundColor = new RGBA_Bytes(0, 0, 0, 120); - iconTextImageButtonFactory.FixedHeight = buttonHeight; - iconTextImageButtonFactory.FixedWidth = buttonHeight; + iconTextImageButtonFactory.FixedHeight = buttonHeight * GuiWidget.DeviceScale; + iconTextImageButtonFactory.FixedWidth = buttonHeight * GuiWidget.DeviceScale; string resetViewIconPath = Path.Combine("ViewTransformControls", "reset.png"); resetViewButton = iconTextImageButtonFactory.Generate("", StaticData.Instance.LoadIcon(resetViewIconPath,32,32).InvertLightness()); @@ -125,8 +125,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow BackgroundColor = new RGBA_Bytes(0, 0, 0, 120); - iconTextImageButtonFactory.FixedHeight = buttonHeight; - iconTextImageButtonFactory.FixedWidth = buttonHeight; + iconTextImageButtonFactory.FixedHeight = buttonHeight * GuiWidget.DeviceScale; + iconTextImageButtonFactory.FixedWidth = buttonHeight * GuiWidget.DeviceScale; string select2dIconPath = Path.Combine("ViewTransformControls", "2d.png"); twoDimensionButton = iconTextImageButtonFactory.GenerateRadioButton("", select2dIconPath); diff --git a/PartPreviewWindow/ViewControls3D.cs b/PartPreviewWindow/ViewControls3D.cs index dfb846bf8..b75a56cbd 100644 --- a/PartPreviewWindow/ViewControls3D.cs +++ b/PartPreviewWindow/ViewControls3D.cs @@ -131,8 +131,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow textImageButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor; BackgroundColor = new RGBA_Bytes(0, 0, 0, 120); - textImageButtonFactory.FixedHeight = buttonHeight; - textImageButtonFactory.FixedWidth = buttonHeight; + textImageButtonFactory.FixedHeight = buttonHeight * GuiWidget.DeviceScale; + textImageButtonFactory.FixedWidth = buttonHeight * GuiWidget.DeviceScale; textImageButtonFactory.AllowThemeToAdjustImage = false; textImageButtonFactory.checkedBorderColor = RGBA_Bytes.White;