Qt: Memory view readability fixes
Jeffrey Pfau jeffrey@endrift.com
Thu, 30 Apr 2015 00:02:37 -0700
2 files changed,
4 insertions(+),
4 deletions(-)
M
src/platform/qt/MemoryModel.cpp
→
src/platform/qt/MemoryModel.cpp
@@ -49,7 +49,7 @@ }
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); - m_margins = QMargins(metrics.width("FFFFFF ") + 4, m_cellHeight + 1, metrics.width(" AAAAAAAAAAAAAAAA") + 3, 0); + m_margins = QMargins(metrics.width("0FFFFFF0 ") + 4, m_cellHeight + 1, metrics.width(" AAAAAAAAAAAAAAAA") + 3, 0); connect(verticalScrollBar(), &QSlider::sliderMoved, [this](int position) { m_top = position;@@ -93,7 +93,7 @@ }
int height = (viewport()->size().height() - m_cellHeight) / m_cellHeight; for (int y = 0; y < height; ++y) { int yp = m_cellHeight * y + m_margins.top(); - QString data = QString("%0").arg(y + m_top + m_base / 16, 6, 16, c0).toUpper(); + QString data = QString("%0").arg((y + m_top) * 16 + m_base, 8, 16, c0).toUpper(); painter.drawText(QRectF(QPointF(0, yp), QSizeF(m_margins.left(), m_cellHeight)), Qt::AlignHCenter, data); for (int x = 0; x < 16; ++x) { uint8_t b = m_cpu->memory.load8(m_cpu, (y + m_top) * 16 + x + m_base, nullptr);
M
src/platform/qt/MemoryView.cpp
→
src/platform/qt/MemoryView.cpp
@@ -42,8 +42,8 @@ { "Palette", BASE_PALETTE_RAM, SIZE_PALETTE_RAM },
{ "VRAM", BASE_VRAM, SIZE_VRAM }, { "OAM", BASE_OAM, SIZE_OAM }, { "ROM", BASE_CART0, SIZE_CART0 }, - { "ROM (WS1)", BASE_CART1, SIZE_CART1 }, - { "ROM (WS2)", BASE_CART2, SIZE_CART2 }, + { "ROM WS1", BASE_CART1, SIZE_CART1 }, + { "ROM WS2", BASE_CART2, SIZE_CART2 }, { "SRAM", BASE_CART_SRAM, SIZE_CART_SRAM }, }; const auto& info = indexInfo[index];