From 08aef9abc0552b6f207c79fb6154ac96e37eb66b Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 16 Nov 2019 21:03:24 -0800 Subject: [PATCH] Increase program size if required for different DPI Closes #2439 --- PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs b/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs index 2ef1a6a2a..478abf232 100644 --- a/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs +++ b/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs @@ -964,6 +964,13 @@ private void ToggleViewReset() Box.HorizontallyCenter(Tab_Box); foreach (var pb in Box.SlotPictureBoxes) pb.ContextMenuStrip = menu.mnuVSD; + + var grid = Box.BoxPokeGrid; + var height = grid.Height + grid.Location.Y + Box.Location.Y; // needed height + var required = height + 16; + var allowed = Tab_Box.Height; + if (required > allowed) + FindForm().Height += required - allowed; } } if (SAV.HasParty)