ui: increase toggle confirmation font size (#26413)

* ui: make toggle confirmation text larger

* center title

* reduce line breaks

* slightly reduce font size
pull/26429/head
Cameron Clough 2 years ago committed by GitHub
parent 59bf2fc008
commit f38fe7cfb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      selfdrive/ui/qt/widgets/controls.h

@ -142,8 +142,8 @@ public:
ParamControl(const QString &param, const QString &title, const QString &desc, const QString &icon, const bool confirm, QWidget *parent = nullptr) : ToggleControl(title, desc, icon, false, parent) { ParamControl(const QString &param, const QString &title, const QString &desc, const QString &icon, const bool confirm, QWidget *parent = nullptr) : ToggleControl(title, desc, icon, false, parent) {
key = param.toStdString(); key = param.toStdString();
QObject::connect(this, &ParamControl::toggleFlipped, [=](bool state) { QObject::connect(this, &ParamControl::toggleFlipped, [=](bool state) {
QString content("<body><h2>" + title + "</h2><br><br>" QString content("<body><h2 style=\"text-align: center;\">" + title + "</h2><br>"
"<p style=\"text-align: center; margin: 0 128px;\">" + getDescription() + "</p></body>"); "<p style=\"text-align: center; margin: 0 128px; font-size: 50px;\">" + getDescription() + "</p></body>");
ConfirmationDialog dialog(content, tr("Ok"), tr("Cancel"), true, this); ConfirmationDialog dialog(content, tr("Ok"), tr("Cancel"), true, this);
if (!confirm || !state || dialog.exec()) { if (!confirm || !state || dialog.exec()) {
params.putBool(key, state); params.putBool(key, state);

Loading…
Cancel
Save