aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/programdock.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/programdock.cpp
parent063da67766585bd1db5e8afd83e2f9eda88119c0 (diff)
downloadqtmips-b7f2cec55f9a90032fc225fed0c1427faeadc879.tar.gz
qtmips-b7f2cec55f9a90032fc225fed0c1427faeadc879.tar.bz2
qtmips-b7f2cec55f9a90032fc225fed0c1427faeadc879.zip
Various graphics tweaks
Diffstat (limited to 'qtmips_gui/programdock.cpp')
-rw-r--r--qtmips_gui/programdock.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/qtmips_gui/programdock.cpp b/qtmips_gui/programdock.cpp
index 70d6a83..974e5ad 100644
--- a/qtmips_gui/programdock.cpp
+++ b/qtmips_gui/programdock.cpp
@@ -53,19 +53,24 @@ QList<QWidget*> ProgramView::row_widget(std::uint32_t address, QWidget *parent)
QList<QWidget*> widgs;
QLabel *l;
+ QFont f;
+ f.setStyleHint(QFont::Monospace);
+
l = new QLabel(" ", parent);
+ l->setFont(f);
widgs.append(l);
- l = new QLabel(QString("0x%1").arg(address, 8, 16, QChar('0')), parent);
+ 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);
+ l->setFont(f);
+ l->setMinimumWidth(60);
if (memory != nullptr)
l->setText(machine::Instruction(memory->read_word(address)).to_str());
- else
- l->setText(" "); // Just fill it in with some plain text so we don't have just addresses there
widgs.append(l);
return widgs;