diff options
| author | in1tiate <32779090+in1tiate@users.noreply.github.com> | 2024-02-10 05:23:34 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-10 12:23:34 +0100 |
| commit | 27726c9ce1fd6ff1e581bade5911e3bf05bc59f2 (patch) | |
| tree | 5e2c01731e8baaa9ee7705b2916944c10a8ae85e /src/courtroom.cpp | |
| parent | ff577255d3aa92ad104d674af9c789bf3be2d31f (diff) | |
Add integer-based theme scaling (#935)
Configurable over the options menu,
Diffstat (limited to 'src/courtroom.cpp')
| -rw-r--r-- | src/courtroom.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 6786aacc..0e4ac25e 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -612,7 +612,7 @@ void Courtroom::set_courtroom_size() m_courtroom_width = f_courtroom.width; m_courtroom_height = f_courtroom.height; - this->setFixedSize(f_courtroom.width, f_courtroom.height); + this->setFixedSize(m_courtroom_width, m_courtroom_height); } ui_background->move(0, 0); ui_background->resize(m_courtroom_width, m_courtroom_height); @@ -1137,6 +1137,11 @@ void Courtroom::set_widgets() void Courtroom::set_fonts(QString p_char) { + QFont new_font = ao_app->default_font; + int new_font_size = new_font.pointSize() * Options::getInstance().themeScalingFactor(); + new_font.setPointSize(new_font_size); + ao_app->setFont(new_font); + set_font(ui_vp_showname, "", "showname", p_char); set_font(ui_vp_message, "", "message", p_char); set_font(ui_ic_chatlog, "", "ic_chatlog", p_char); @@ -1159,7 +1164,7 @@ void Courtroom::set_font(QWidget *widget, QString class_name, QString design_file = "courtroom_fonts.ini"; if (f_pointsize <= 0) f_pointsize = - ao_app->get_design_element(p_identifier, design_file, ao_app->get_chat(p_char)).toInt(); + ao_app->get_design_element(p_identifier, design_file, ao_app->get_chat(p_char)).toInt() * Options::getInstance().themeScalingFactor(); if (font_name == "") font_name = ao_app->get_design_element(p_identifier + "_font", design_file, ao_app->get_chat(p_char)); |
