aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/memorydock.cpp
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-01-27 15:18:52 +0100
committerKarel Kočí <cynerd@email.cz>2018-01-27 15:18:52 +0100
commitb7f2cec55f9a90032fc225fed0c1427faeadc879 (patch)
treebcb192542a0bb8ce4a3b76600c1e2a671c6af382 /qtmips_gui/memorydock.cpp
parent063da67766585bd1db5e8afd83e2f9eda88119c0 (diff)
downloadqtmips-b7f2cec55f9a90032fc225fed0c1427faeadc879.tar.gz
qtmips-b7f2cec55f9a90032fc225fed0c1427faeadc879.tar.bz2
qtmips-b7f2cec55f9a90032fc225fed0c1427faeadc879.zip
Various graphics tweaks
Diffstat (limited to 'qtmips_gui/memorydock.cpp')
-rw-r--r--qtmips_gui/memorydock.cpp14
1 files changed, 8 insertions, 6 deletions
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<QWidget*> DataView::row_widget(std::uint32_t address, QWidget *parent) {
QList<QWidget*> 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;