Inflate padding to account for scaling
- Issue MatterHackers/MCCentral#3236 Incorrect menu size when scaled to minimum size (0.7)
This commit is contained in:
parent
29f42eed54
commit
3b31a77d32
2 changed files with 4 additions and 2 deletions
|
|
@ -302,7 +302,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
public MenuItem(GuiWidget content, ThemeConfig theme)
|
||||
: base (theme)
|
||||
{
|
||||
this.Padding = new BorderDouble(left: theme.MenuGutterWidth, right: 15);
|
||||
// Inflate padding to match the target (MenuGutterWidth) after scale operation in assignment
|
||||
this.Padding = new BorderDouble(left: Math.Ceiling(theme.MenuGutterWidth / GuiWidget.DeviceScale) , right: 15);
|
||||
this.BackgroundColor = theme.Colors.PrimaryBackgroundColor;
|
||||
this.HAnchor = HAnchor.MaxFitOrStretch;
|
||||
this.VAnchor = VAnchor.Fit;
|
||||
|
|
|
|||
|
|
@ -448,7 +448,8 @@ namespace MatterHackers.MatterControl
|
|||
widget.DebugShowBounds = false;
|
||||
}
|
||||
|
||||
if (scene.DebugItem != null
|
||||
if (scene != null
|
||||
&& scene.DebugItem != null
|
||||
&& tabControl1.SelectedIndex != 1)
|
||||
{
|
||||
scene.DebugItem = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue