aboutsummaryrefslogtreecommitdiff
path: root/src/courtroom.cpp
diff options
context:
space:
mode:
authorLeifa <26681464+TrickyLeifa@users.noreply.github.com>2024-07-11 20:40:21 +0200
committerGitHub <noreply@github.com>2024-07-11 20:40:21 +0200
commitc745d0a1b78732550ae790fee12bd23b71a4f25e (patch)
tree8827fb1c80b4365a67b669803cec1fe10e7313b9 /src/courtroom.cpp
parentb74281d8b59c86507a9929276d2b3963dde2e8ce (diff)
QApplication less! (#1017)
Diffstat (limited to 'src/courtroom.cpp')
-rw-r--r--src/courtroom.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index 75f45570..7a439586 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -1182,7 +1182,7 @@ 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);
+ QApplication::setFont(new_font);
set_font(ui_vp_showname, "", "showname", p_char);
set_font(ui_vp_message, "", "message", p_char);
@@ -3354,7 +3354,7 @@ void Courtroom::handle_callwords()
// Play the call word sfx on the modcall_player sound container
modcall_player->findAndPlaySfx(ao_app->get_court_sfx("word_call"));
// Make the window flash
- ao_app->alert(this);
+ QApplication::alert(this);
// Break the loop so we don't spam sound effects
break;
}
@@ -4890,7 +4890,7 @@ void Courtroom::mod_called(QString p_ip)
if (!ui_guard->isChecked())
{
modcall_player->findAndPlaySfx(ao_app->get_court_sfx("mod_call"));
- ao_app->alert(this);
+ QApplication::alert(this);
}
}
@@ -6600,7 +6600,7 @@ void Courtroom::truncate_label_text(QWidget *p_widget, QString p_identifier)
return;
}
- int checkbox_width = AOApplication::style()->pixelMetric(QStyle::PM_IndicatorWidth) + AOApplication::style()->pixelMetric(QStyle::PM_CheckBoxLabelSpacing);
+ int checkbox_width = QApplication::style()->pixelMetric(QStyle::PM_IndicatorWidth) + QApplication::style()->pixelMetric(QStyle::PM_CheckBoxLabelSpacing);
int label_theme_width = (p_label != nullptr ? design_ini_result.width : (design_ini_result.width - checkbox_width));
int label_px_width = p_widget->fontMetrics().boundingRect(label_text_tr).width(); // pixel width of our translated text