From b7f2cec55f9a90032fc225fed0c1427faeadc879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 27 Jan 2018 15:18:52 +0100 Subject: Various graphics tweaks --- qtmips_gui/memorydock.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'qtmips_gui/memorydock.cpp') diff --git a/qtmips_gui/memorydock.cpp b/qtmips_gui/memorydock.cpp index d0bad9c..92dcb20 100644 --- a/qtmips_gui/memorydock.cpp +++ b/qtmips_gui/memorydock.cpp @@ -6,17 +6,19 @@ QList DataView::row_widget(std::uint32_t address, QWidget *parent) { QList widgs; QLabel *l; - l = new QLabel(QString("0x%1").arg(address, 8, 16, QChar('0')), parent); + QFont f; + f.setStyleHint(QFont::Monospace); + + l = new QLabel(QString("0x") + QString("%1").arg(address, 8, 16, QChar('0')).toUpper(), parent); l->setTextInteractionFlags(Qt::TextSelectableByMouse); + l->setFont(f); widgs.append(l); l = new QLabel(parent); l->setTextInteractionFlags(Qt::TextSelectableByMouse); - if (memory != nullptr) { - l->setText(QString("0x%1").arg(memory->read_word(address), 8, 16, QChar('0'))); - } - else - l->setText(" "); // Just fill it in with some plain text so we don't have just addresses there + l->setFont(f); + if (memory != nullptr) + l->setText(QString("0x") + QString("%1").arg(memory->read_word(address), 8, 16, QChar('0')).toUpper()); widgs.append(l); return widgs; -- cgit v1.2.3