all repos — mgba @ 2bde27fd90fcfe0f6794675decd81a463fbfdc98

mGBA Game Boy Advance Emulator

Qt: Add per-page scrolling to memory view (fixes #1795)
Vicki Pfau vi@endrift.com
Sat, 20 Jun 2020 03:00:44 -0700
commit

2bde27fd90fcfe0f6794675decd81a463fbfdc98

parent

0290198ea1a9a62e13fb700d7573d2a4cb24f9a3

2 files changed, 12 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -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.cppsrc/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;