diff --git a/selfdrive/ui/qt/offroad/networking.cc b/selfdrive/ui/qt/offroad/networking.cc
index 13697adfb5..d69d67edeb 100644
--- a/selfdrive/ui/qt/offroad/networking.cc
+++ b/selfdrive/ui/qt/offroad/networking.cc
@@ -314,7 +314,7 @@ void WifiUI::refresh() {
QPushButton *forgetBtn = new QPushButton(tr("FORGET"));
forgetBtn->setObjectName("forgetBtn");
QObject::connect(forgetBtn, &QPushButton::clicked, [=]() {
- if (ConfirmationDialog::confirm(tr("Forget Wi-Fi Network \"%1\"?").arg(QString::fromUtf8(network.ssid)), this)) {
+ if (ConfirmationDialog::confirm(tr("Forget Wi-Fi Network \"%1\"?").arg(QString::fromUtf8(network.ssid)), tr("Forget"), this)) {
wifi->forgetConnection(network.ssid);
}
});
diff --git a/selfdrive/ui/qt/offroad/settings.cc b/selfdrive/ui/qt/offroad/settings.cc
index b154447eb8..51b5ce6bd7 100644
--- a/selfdrive/ui/qt/offroad/settings.cc
+++ b/selfdrive/ui/qt/offroad/settings.cc
@@ -169,7 +169,7 @@ DevicePanel::DevicePanel(SettingsWindow *parent) : ListWidget(parent) {
auto resetCalibBtn = new ButtonControl(tr("Reset Calibration"), tr("RESET"), "");
connect(resetCalibBtn, &ButtonControl::showDescriptionEvent, this, &DevicePanel::updateCalibDescription);
connect(resetCalibBtn, &ButtonControl::clicked, [&]() {
- if (ConfirmationDialog::confirm(tr("Are you sure you want to reset calibration?"), this)) {
+ if (ConfirmationDialog::confirm(tr("Are you sure you want to reset calibration?"), tr("Reset"), this)) {
params.remove("CalibrationParams");
}
});
@@ -178,7 +178,7 @@ DevicePanel::DevicePanel(SettingsWindow *parent) : ListWidget(parent) {
if (!params.getBool("Passive")) {
auto retrainingBtn = new ButtonControl(tr("Review Training Guide"), tr("REVIEW"), tr("Review the rules, features, and limitations of openpilot"));
connect(retrainingBtn, &ButtonControl::clicked, [=]() {
- if (ConfirmationDialog::confirm(tr("Are you sure you want to review the training guide?"), this)) {
+ if (ConfirmationDialog::confirm(tr("Are you sure you want to review the training guide?"), tr("Review"), this)) {
emit reviewTrainingGuide();
}
});
@@ -266,7 +266,7 @@ void DevicePanel::updateCalibDescription() {
void DevicePanel::reboot() {
if (!uiState()->engaged()) {
- if (ConfirmationDialog::confirm(tr("Are you sure you want to reboot?"), this)) {
+ if (ConfirmationDialog::confirm(tr("Are you sure you want to reboot?"), tr("Reboot"), this)) {
// Check engaged again in case it changed while the dialog was open
if (!uiState()->engaged()) {
Params().putBool("DoReboot", true);
@@ -279,7 +279,7 @@ void DevicePanel::reboot() {
void DevicePanel::poweroff() {
if (!uiState()->engaged()) {
- if (ConfirmationDialog::confirm(tr("Are you sure you want to power off?"), this)) {
+ if (ConfirmationDialog::confirm(tr("Are you sure you want to power off?"), tr("Power Off"), this)) {
// Check engaged again in case it changed while the dialog was open
if (!uiState()->engaged()) {
Params().putBool("DoShutdown", true);
diff --git a/selfdrive/ui/qt/offroad/software_settings.cc b/selfdrive/ui/qt/offroad/software_settings.cc
index e08a02a4d6..12d62e63fb 100644
--- a/selfdrive/ui/qt/offroad/software_settings.cc
+++ b/selfdrive/ui/qt/offroad/software_settings.cc
@@ -77,7 +77,7 @@ SoftwarePanel::SoftwarePanel(QWidget* parent) : ListWidget(parent) {
// uninstall button
auto uninstallBtn = new ButtonControl(tr("Uninstall %1").arg(getBrand()), tr("UNINSTALL"));
connect(uninstallBtn, &ButtonControl::clicked, [&]() {
- if (ConfirmationDialog::confirm(tr("Are you sure you want to uninstall?"), this)) {
+ if (ConfirmationDialog::confirm(tr("Are you sure you want to uninstall?"), tr("Uninstall"), this)) {
params.putBool("DoUninstall", true);
}
});
diff --git a/selfdrive/ui/qt/widgets/input.cc b/selfdrive/ui/qt/widgets/input.cc
index 897e4b5a05..75453e1b90 100644
--- a/selfdrive/ui/qt/widgets/input.cc
+++ b/selfdrive/ui/qt/widgets/input.cc
@@ -185,7 +185,11 @@ void InputDialog::setMinLength(int length) {
ConfirmationDialog::ConfirmationDialog(const QString &prompt_text, const QString &confirm_text, const QString &cancel_text,
const bool rich, QWidget *parent) : QDialogBase(parent) {
QFrame *container = new QFrame(this);
- container->setStyleSheet("QFrame { background-color: #1B1B1B; color: #C9C9C9; }");
+ container->setStyleSheet(R"(
+ QFrame { background-color: #1B1B1B; color: #C9C9C9; }
+ #confirm_btn { background-color: #465BEA; }
+ #confirm_btn:pressed { background-color: #3049F4; }
+ )");
QVBoxLayout *main_layout = new QVBoxLayout(container);
main_layout->setContentsMargins(32, rich ? 32 : 120, 32, 32);
@@ -208,6 +212,7 @@ ConfirmationDialog::ConfirmationDialog(const QString &prompt_text, const QString
if (confirm_text.length()) {
QPushButton* confirm_btn = new QPushButton(confirm_text);
+ confirm_btn->setObjectName("confirm_btn");
btn_layout->addWidget(confirm_btn);
QObject::connect(confirm_btn, &QPushButton::clicked, this, &ConfirmationDialog::accept);
}
@@ -223,8 +228,8 @@ bool ConfirmationDialog::alert(const QString &prompt_text, QWidget *parent) {
return d.exec();
}
-bool ConfirmationDialog::confirm(const QString &prompt_text, QWidget *parent) {
- ConfirmationDialog d = ConfirmationDialog(prompt_text, tr("Ok"), tr("Cancel"), false, parent);
+bool ConfirmationDialog::confirm(const QString &prompt_text, const QString &confirm_text, QWidget *parent) {
+ ConfirmationDialog d = ConfirmationDialog(prompt_text, confirm_text, tr("Cancel"), false, parent);
return d.exec();
}
diff --git a/selfdrive/ui/qt/widgets/input.h b/selfdrive/ui/qt/widgets/input.h
index 117e6ca05e..e6c0fba86d 100644
--- a/selfdrive/ui/qt/widgets/input.h
+++ b/selfdrive/ui/qt/widgets/input.h
@@ -57,7 +57,7 @@ public:
explicit ConfirmationDialog(const QString &prompt_text, const QString &confirm_text,
const QString &cancel_text, const bool rich, QWidget* parent);
static bool alert(const QString &prompt_text, QWidget *parent);
- static bool confirm(const QString &prompt_text, QWidget *parent);
+ static bool confirm(const QString &prompt_text, const QString &confirm_text, QWidget *parent);
static bool rich(const QString &prompt_text, QWidget *parent);
};
diff --git a/selfdrive/ui/translations/main_ja.ts b/selfdrive/ui/translations/main_ja.ts
index d3c55b5be4..5ee2d86756 100644
--- a/selfdrive/ui/translations/main_ja.ts
+++ b/selfdrive/ui/translations/main_ja.ts
@@ -238,6 +238,14 @@
Disengage to Power Off
openpilot をキャンセルしてシャットダウンができます
+
+ Reset
+
+
+
+ Review
+
+
DriveStats
@@ -854,6 +862,10 @@ location set
CHECK
確認
+
+ Uninstall
+
+
SshControl
@@ -1056,5 +1068,9 @@ location set
Forget Wi-Fi Network "%1"?
Wi-Fiネットワーク%1を削除してもよろしいですか?
+
+ Forget
+
+
diff --git a/selfdrive/ui/translations/main_ko.ts b/selfdrive/ui/translations/main_ko.ts
index 4112087f72..397b43f545 100644
--- a/selfdrive/ui/translations/main_ko.ts
+++ b/selfdrive/ui/translations/main_ko.ts
@@ -238,6 +238,14 @@
Disengage to Power Off
전원을 종료하려면 해제하세요
+
+ Reset
+
+
+
+ Review
+
+
DriveStats
@@ -854,6 +862,10 @@ location set
CHECK
확인
+
+ Uninstall
+
+
SshControl
@@ -1056,5 +1068,9 @@ location set
Forget Wi-Fi Network "%1"?
wifi 네트워크 저장안함 "%1"?
+
+ Forget
+
+
diff --git a/selfdrive/ui/translations/main_pt-BR.ts b/selfdrive/ui/translations/main_pt-BR.ts
index ab1946e6af..6774555b73 100644
--- a/selfdrive/ui/translations/main_pt-BR.ts
+++ b/selfdrive/ui/translations/main_pt-BR.ts
@@ -238,6 +238,14 @@
Disengage to Power Off
Desacione para Desligar
+
+ Reset
+
+
+
+ Review
+
+
DriveStats
@@ -858,6 +866,10 @@ trabalho definido
CHECK
VERIFICAR
+
+ Uninstall
+
+
SshControl
@@ -1060,5 +1072,9 @@ trabalho definido
Forget Wi-Fi Network "%1"?
Esquecer Rede Wi-Fi "%1"?
+
+ Forget
+
+
diff --git a/selfdrive/ui/translations/main_zh-CHS.ts b/selfdrive/ui/translations/main_zh-CHS.ts
index 2baae98669..6189a235e8 100644
--- a/selfdrive/ui/translations/main_zh-CHS.ts
+++ b/selfdrive/ui/translations/main_zh-CHS.ts
@@ -238,6 +238,14 @@
Disengage to Power Off
取消openpilot以关机
+
+ Reset
+
+
+
+ Review
+
+
DriveStats
@@ -852,6 +860,10 @@ location set
CHECK
查看
+
+ Uninstall
+
+
SshControl
@@ -1054,5 +1066,9 @@ location set
Forget Wi-Fi Network "%1"?
忘记WiFi网络 "%1"?
+
+ Forget
+
+
diff --git a/selfdrive/ui/translations/main_zh-CHT.ts b/selfdrive/ui/translations/main_zh-CHT.ts
index 44c231311a..0b0dbe4ae5 100644
--- a/selfdrive/ui/translations/main_zh-CHT.ts
+++ b/selfdrive/ui/translations/main_zh-CHT.ts
@@ -238,6 +238,14 @@
Disengage to Power Off
請先取消控車才能關機
+
+ Reset
+
+
+
+ Review
+
+
DriveStats
@@ -854,6 +862,10 @@ location set
CHECK
檢查
+
+ Uninstall
+
+
SshControl
@@ -1056,5 +1068,9 @@ location set
Forget Wi-Fi Network "%1"?
清除 Wi-Fi 網路 "%1"?
+
+ Forget
+
+