Hex editor - better scrollbar logic for really small domains that don't need a scrollbar
This commit is contained in:
parent
7ddfc9e013
commit
1e5ff72519
|
@ -865,6 +865,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
_rowsVisible = (MemoryViewerBox.Height - (fontHeight * 2) - (fontHeight / 2)) / fontHeight;
|
_rowsVisible = (MemoryViewerBox.Height - (fontHeight * 2) - (fontHeight / 2)) / fontHeight;
|
||||||
var totalRows = _domain.Size / 16;
|
var totalRows = _domain.Size / 16;
|
||||||
|
|
||||||
|
if (totalRows < _rowsVisible)
|
||||||
|
{
|
||||||
|
_rowsVisible = totalRows;
|
||||||
|
}
|
||||||
|
|
||||||
HexScrollBar.Maximum = totalRows - 1;
|
HexScrollBar.Maximum = totalRows - 1;
|
||||||
HexScrollBar.LargeChange = _rowsVisible;
|
HexScrollBar.LargeChange = _rowsVisible;
|
||||||
HexScrollBar.Visible = totalRows > _rowsVisible;
|
HexScrollBar.Visible = totalRows > _rowsVisible;
|
||||||
|
|
Loading…
Reference in New Issue