From 1e5ff72519dee7ee7f32da074e41e382b720c7a2 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 21 Dec 2013 20:06:52 +0000 Subject: [PATCH] Hex editor - better scrollbar logic for really small domains that don't need a scrollbar --- BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs b/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs index 6d79caa832..3dabb98ebc 100644 --- a/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs +++ b/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs @@ -865,6 +865,11 @@ namespace BizHawk.Client.EmuHawk _rowsVisible = (MemoryViewerBox.Height - (fontHeight * 2) - (fontHeight / 2)) / fontHeight; var totalRows = _domain.Size / 16; + if (totalRows < _rowsVisible) + { + _rowsVisible = totalRows; + } + HexScrollBar.Maximum = totalRows - 1; HexScrollBar.LargeChange = _rowsVisible; HexScrollBar.Visible = totalRows > _rowsVisible;