mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-26 08:40:08 +00:00
Merge pull request #1118 from Kloen/monospace-font
citra-qt: Use monospace font on Disassembler and ARM Registers
This commit is contained in:
commit
0f2005c370
@ -9,6 +9,8 @@
|
|||||||
#include "../bootmanager.h"
|
#include "../bootmanager.h"
|
||||||
#include "../hotkeys.h"
|
#include "../hotkeys.h"
|
||||||
|
|
||||||
|
#include "../util/util.h"
|
||||||
|
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
@ -17,7 +19,6 @@
|
|||||||
#include "core/arm/arm_interface.h"
|
#include "core/arm/arm_interface.h"
|
||||||
#include "core/arm/disassembler/arm_disasm.h"
|
#include "core/arm/disassembler/arm_disasm.h"
|
||||||
|
|
||||||
|
|
||||||
DisassemblerModel::DisassemblerModel(QObject* parent) :
|
DisassemblerModel::DisassemblerModel(QObject* parent) :
|
||||||
QAbstractListModel(parent), base_address(0), code_size(0), program_counter(0), selection(QModelIndex()) {
|
QAbstractListModel(parent), base_address(0), code_size(0), program_counter(0), selection(QModelIndex()) {
|
||||||
}
|
}
|
||||||
@ -78,6 +79,14 @@ QVariant DisassemblerModel::data(const QModelIndex& index, int role) const {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case Qt::FontRole:
|
||||||
|
{
|
||||||
|
if (index.column() == 0 || index.column() == 1) { // 2 is the symbols column
|
||||||
|
return GetMonospaceFont();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
#include "registers.h"
|
#include "registers.h"
|
||||||
|
|
||||||
|
#include "../util/util.h"
|
||||||
|
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/arm/arm_interface.h"
|
#include "core/arm/arm_interface.h"
|
||||||
|
|
||||||
@ -26,9 +28,32 @@ RegistersWidget::RegistersWidget(QWidget* parent) : QDockWidget(parent) {
|
|||||||
vfp_registers->addChild(child);
|
vfp_registers->addChild(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QFont font = GetMonospaceFont();
|
||||||
|
|
||||||
CreateCPSRChildren();
|
CreateCPSRChildren();
|
||||||
CreateVFPSystemRegisterChildren();
|
CreateVFPSystemRegisterChildren();
|
||||||
|
|
||||||
|
// Set Registers to display in monospace font
|
||||||
|
for (int i = 0; i < core_registers->childCount(); ++i)
|
||||||
|
core_registers->child(i)->setFont(1, font);
|
||||||
|
|
||||||
|
for (int i = 0; i < vfp_registers->childCount(); ++i)
|
||||||
|
vfp_registers->child(i)->setFont(1, font);
|
||||||
|
|
||||||
|
for (int i = 0; i < vfp_system_registers->childCount(); ++i) {
|
||||||
|
vfp_system_registers->child(i)->setFont(1, font);
|
||||||
|
for (int x = 0; x < vfp_system_registers->child(i)->childCount(); ++x) {
|
||||||
|
vfp_system_registers->child(i)->child(x)->setFont(1, font);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Set CSPR to display in monospace font
|
||||||
|
cpsr->setFont(1, font);
|
||||||
|
for (int i = 0; i < cpsr->childCount(); ++i) {
|
||||||
|
cpsr->child(i)->setFont(1, font);
|
||||||
|
for (int x = 0; x < cpsr->child(i)->childCount(); ++x) {
|
||||||
|
cpsr->child(i)->child(x)->setFont(1, font);
|
||||||
|
}
|
||||||
|
}
|
||||||
setEnabled(false);
|
setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user