Qt: Add per-page scrolling to memory view (fixes #1795)
Vicki Pfau vi@endrift.com
Sat, 20 Jun 2020 03:00:44 -0700
2 files changed,
12 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -6,6 +6,8 @@ - GB MBC: Fix MBC2 bit selection
Other fixes: - GB Core: Fix extracting SRAM when none is present - GBA Savedata: Fix extracting save when not yet configured in-game +Misc: + - Qt: Add per-page scrolling to memory view (fixes mgba.io/i/1795) 0.8.2: (2020-06-14) Emulation fixes:
M
src/platform/qt/MemoryModel.cpp
→
src/platform/qt/MemoryModel.cpp
@@ -93,6 +93,10 @@ if (action == QSlider::SliderSingleStepAdd) {
++m_top; } else if (action == QSlider::SliderSingleStepSub) { --m_top; + } else if (action == QSlider::SliderPageStepAdd) { + m_top += (viewport()->size().height() - m_cellHeight) / m_cellHeight; + } else if (action == QSlider::SliderPageStepSub) { + m_top -= (viewport()->size().height() - m_cellHeight) / m_cellHeight; } else { return; }@@ -589,6 +593,12 @@ adjustCursor(-16, event->modifiers() & Qt::ShiftModifier);
return; case Qt::Key_Down: adjustCursor(16, event->modifiers() & Qt::ShiftModifier); + return; + case Qt::Key_PageUp: + adjustCursor(-16 * ((viewport()->size().height() - m_cellHeight) / m_cellHeight), event->modifiers() & Qt::ShiftModifier); + return; + case Qt::Key_PageDown: + adjustCursor(16 * ((viewport()->size().height() - m_cellHeight) / m_cellHeight), event->modifiers() & Qt::ShiftModifier); return; default: return;