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,
11 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -34,6 +34,7 @@ - FFmpeg: Add looping option for GIF/APNG
- Qt: Renderer can be changed while a game is running - Qt: Add hex index to palette view - Qt: Add transformation matrix info to sprite view + - 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;