Replace fonts specified in forms

This commit is contained in:
GriffinR 2025-06-09 13:55:51 -04:00
parent 1e1010601f
commit 0620e94824
4 changed files with 7 additions and 35 deletions

View File

@ -16,15 +16,6 @@
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label_Title">
<property name="font">
<font>
<family>Arial</family>
<pointsize>22</pointsize>
<bold>true</bold>
<underline>false</underline>
<kerning>true</kerning>
</font>
</property>
<property name="text">
<string>Porymap</string>
</property>
@ -44,12 +35,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Arial</family>
<pointsize>12</pointsize>
</font>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
@ -60,11 +45,6 @@
</item>
<item>
<widget class="QLabel" name="label_Description">
<property name="font">
<font>
<family>Arial</family>
</font>
</property>
<property name="text">
<string>Map editor for pokeemerald, pokefirered and pokeruby.</string>
</property>

View File

@ -169,11 +169,6 @@
</item>
<item>
<widget class="QLabel" name="label_RGB">
<property name="font">
<font>
<family>Courier</family>
</font>
</property>
<property name="text">
<string>RGB (000, 000, 000)</string>
</property>
@ -181,11 +176,6 @@
</item>
<item>
<widget class="QLabel" name="label_HEX">
<property name="font">
<font>
<family>Courier</family>
</font>
</property>
<property name="text">
<string>#FFFFFF</string>
</property>
@ -199,11 +189,6 @@
</item>
<item>
<widget class="QLabel" name="label_SPACE">
<property name="font">
<font>
<family>Courier</family>
</font>
</property>
<property name="text">
<string>press [SPACE] to capture color</string>
</property>

View File

@ -8,6 +8,11 @@ AboutPorymap::AboutPorymap(QWidget *parent) :
ui->setupUi(this);
setAttribute(Qt::WA_DeleteOnClose);
// Set font in the stylesheet as opposed to the form so that it won't be overwritten by custom user fonts.
setStyleSheet("QLabel { font-family: \"Arial\"; }"
"QLabel#label_Title { font-size: 22pt; font-weight: bold; } "
"QLabel#label_Version { font-size: 12pt; }");
this->ui->label_Version->setText(getVersionString());
layout()->setSizeConstraint(QLayout::SetFixedSize);

View File

@ -13,6 +13,8 @@ ColorPicker::ColorPicker(QWidget *parent) :
this->scene = new QGraphicsScene;
setStyleSheet("QLabel#label_RGB, QLabel#label_HEX { font-family: \"Courier\"; }");
// listen for spacebar press to take color
QShortcut *takeColor = new QShortcut(Qt::Key_Space, this);
QObject::connect(takeColor, &QShortcut::activated, [this](){