diff options
-rw-r--r-- | qtmips_gui/cacheview.cpp | 2 | ||||
-rw-r--r-- | qtmips_gui/coreview/adder.cpp | 2 | ||||
-rw-r--r-- | qtmips_gui/coreview/alu.cpp | 2 | ||||
-rw-r--r-- | qtmips_gui/coreview/constant.cpp | 2 | ||||
-rw-r--r-- | qtmips_gui/coreview/logicblock.cpp | 2 | ||||
-rw-r--r-- | qtmips_gui/coreview/memory.cpp | 2 | ||||
-rw-r--r-- | qtmips_gui/coreview/programcounter.cpp | 2 | ||||
-rw-r--r-- | qtmips_gui/coreview/registers.cpp | 2 | ||||
-rw-r--r-- | qtmips_gui/coreview/value.cpp | 2 | ||||
-rw-r--r-- | qtmips_gui/fontsize.cpp | 6 |
10 files changed, 12 insertions, 12 deletions
diff --git a/qtmips_gui/cacheview.cpp b/qtmips_gui/cacheview.cpp index 9373cff..09f3df7 100644 --- a/qtmips_gui/cacheview.cpp +++ b/qtmips_gui/cacheview.cpp @@ -146,7 +146,7 @@ CacheViewBlock::CacheViewBlock(const machine::Cache *cache, unsigned block , boo curr_row = 0; QFont font; - font.setPointSize(FontSize::SIZE7); + font.setPixelSize(FontSize::SIZE7); validity = new QGraphicsSimpleTextItem*[rows]; if (cache->config().write_policy() == machine::MachineConfigCache::WP_BACK) diff --git a/qtmips_gui/coreview/adder.cpp b/qtmips_gui/coreview/adder.cpp index d24b603..49d67d4 100644 --- a/qtmips_gui/coreview/adder.cpp +++ b/qtmips_gui/coreview/adder.cpp @@ -48,7 +48,7 @@ using namespace coreview; Adder::Adder() : QGraphicsItem(nullptr), plus("+", this) { QFont font; - font.setPointSize(FontSize::SIZE7); + font.setPixelSize(FontSize::SIZE7); plus.setFont(font); QRectF plus_box = plus.boundingRect(); plus.setPos(DENT + (WIDTH-DENT)/2 - plus_box.width()/2, HEIGHT/2 - plus_box.height()/2); diff --git a/qtmips_gui/coreview/alu.cpp b/qtmips_gui/coreview/alu.cpp index 31f1529..e1494cb 100644 --- a/qtmips_gui/coreview/alu.cpp +++ b/qtmips_gui/coreview/alu.cpp @@ -47,7 +47,7 @@ coreview::Alu::Alu() : QGraphicsItem(nullptr), name("ALU", this) { name.setPos(3, 25); QFont font; - font.setPointSize(FontSize::SIZE7); + font.setPixelSize(FontSize::SIZE7); name.setFont(font); con_in_a = new Connector(Connector::AX_X); diff --git a/qtmips_gui/coreview/constant.cpp b/qtmips_gui/coreview/constant.cpp index a4286e6..343527e 100644 --- a/qtmips_gui/coreview/constant.cpp +++ b/qtmips_gui/coreview/constant.cpp @@ -45,7 +45,7 @@ using namespace coreview; Constant::Constant(const Connector *con, const QString &text) : QGraphicsObject(nullptr), text(text, this) { QFont font; - font.setPointSize(FontSize::SIZE7); + font.setPixelSize(FontSize::SIZE7); this->text.setFont(font); con_our = new Connector(Connector::AX_X); diff --git a/qtmips_gui/coreview/logicblock.cpp b/qtmips_gui/coreview/logicblock.cpp index dfc77b1..b1ab37c 100644 --- a/qtmips_gui/coreview/logicblock.cpp +++ b/qtmips_gui/coreview/logicblock.cpp @@ -50,7 +50,7 @@ LogicBlock::LogicBlock(QString name) : LogicBlock(QVector<QString>({name})) { } LogicBlock::LogicBlock(QVector<QString> name) : QGraphicsObject(nullptr) { QFont font; - font.setPointSize(FontSize::SIZE7); + font.setPixelSize(FontSize::SIZE7); qreal h = 0, w = 0; for (int i = 0; i < name.size(); i++) { diff --git a/qtmips_gui/coreview/memory.cpp b/qtmips_gui/coreview/memory.cpp index b690db4..286e6da 100644 --- a/qtmips_gui/coreview/memory.cpp +++ b/qtmips_gui/coreview/memory.cpp @@ -50,7 +50,7 @@ Memory::Memory(bool cache_used, const machine::Cache *cch) : QGraphicsObject(nul cache = cache_used; QFont font; - font.setPointSize(FontSize::SIZE7); + font.setPixelSize(FontSize::SIZE7); name.setFont(font); type.setFont(font); cache_t.setFont(font); diff --git a/qtmips_gui/coreview/programcounter.cpp b/qtmips_gui/coreview/programcounter.cpp index 3a8c068..018bb38 100644 --- a/qtmips_gui/coreview/programcounter.cpp +++ b/qtmips_gui/coreview/programcounter.cpp @@ -50,7 +50,7 @@ ProgramCounter::ProgramCounter(machine::QtMipsMachine *machine) : QGraphicsObjec QFont font; - font.setPointSize(FontSize::SIZE7); + font.setPixelSize(FontSize::SIZE7); name.setPos(WIDTH/2 - name.boundingRect().width()/2, 0); name.setFont(font); font.setPointSize(FontSize::SIZE8); diff --git a/qtmips_gui/coreview/registers.cpp b/qtmips_gui/coreview/registers.cpp index 8ccff27..ed3b508 100644 --- a/qtmips_gui/coreview/registers.cpp +++ b/qtmips_gui/coreview/registers.cpp @@ -57,7 +57,7 @@ Registers::Registers() : QGraphicsObject(nullptr), name("Registers", this) { // TODO do we want to have any hooks on real registers? QFont font; - font.setPointSize(FontSize::SIZE7); + font.setPixelSize(FontSize::SIZE7); name.setFont(font); QRectF name_box = name.boundingRect(); diff --git a/qtmips_gui/coreview/value.cpp b/qtmips_gui/coreview/value.cpp index 2be8bb6..1250fb1 100644 --- a/qtmips_gui/coreview/value.cpp +++ b/qtmips_gui/coreview/value.cpp @@ -59,7 +59,7 @@ QRectF Value::boundingRect() const { void Value::paint(QPainter *painter, const QStyleOptionGraphicsItem *option __attribute__((unused)), QWidget *widget __attribute__((unused))){ QFont f; - f.setPointSize(FontSize::SIZE7); + f.setPixelSize(FontSize::SIZE7); painter->setFont(f); QRectF rect; diff --git a/qtmips_gui/fontsize.cpp b/qtmips_gui/fontsize.cpp index 8923d08..5d65cba 100644 --- a/qtmips_gui/fontsize.cpp +++ b/qtmips_gui/fontsize.cpp @@ -14,10 +14,10 @@ void FontSize::init() { int h = QFontMetrics(QApplication::font()).height(); qDebug() << "Font size:" << h; - h /= 5; - int d = h / 10 + 1; + h /= 3; + int d = h / 4 + 1; FontSize::SIZE5 = h - 2*d; FontSize::SIZE6 = h - d; FontSize::SIZE7 = h; - FontSize::SIZE8 = h + d; + FontSize::SIZE8 = h + d/2; } |