small style improvement in settings
old-commit-hash: 647c5804b8e8fc4cc0c43ec32d60ea0468ddb4df
This commit is contained in:
@@ -110,9 +110,21 @@ QWidget * device_panel() {
|
||||
}
|
||||
}));
|
||||
|
||||
device_layout->addWidget(horizontal_line());
|
||||
|
||||
QString brand = params.read_db_bool("Passive") ? "dashcam" : "openpilot";
|
||||
device_layout->addWidget(new ButtonControl("Uninstall " + brand, "UNINSTALL",
|
||||
"",
|
||||
[=]() {
|
||||
if (ConfirmationDialog::confirm("Are you srue you want to uninstall?")) {
|
||||
Params().write_db_value("DoUninstall", "1");
|
||||
}
|
||||
}));
|
||||
|
||||
// power buttons
|
||||
|
||||
QPushButton *poweroff_btn = new QPushButton("Power Off");
|
||||
poweroff_btn->setStyleSheet("background-color: #E22C2C;");
|
||||
device_layout->addWidget(poweroff_btn, Qt::AlignBottom);
|
||||
QObject::connect(poweroff_btn, &QPushButton::released, [=]() {
|
||||
if (ConfirmationDialog::confirm("Are you sure you want to power off?")) {
|
||||
@@ -120,7 +132,7 @@ QWidget * device_panel() {
|
||||
}
|
||||
});
|
||||
|
||||
device_layout->addWidget(horizontal_line(), Qt::AlignBottom);
|
||||
device_layout->addSpacing(20);
|
||||
|
||||
QPushButton *reboot_btn = new QPushButton("Reboot");
|
||||
device_layout->addWidget(reboot_btn, Qt::AlignBottom);
|
||||
@@ -130,14 +142,6 @@ QWidget * device_panel() {
|
||||
}
|
||||
});
|
||||
|
||||
QPushButton *uninstall_btn = new QPushButton("Uninstall openpilot");
|
||||
device_layout->addWidget(uninstall_btn);
|
||||
QObject::connect(uninstall_btn, &QPushButton::released, [=]() {
|
||||
if (ConfirmationDialog::confirm("Are you sure you want to uninstall?")) {
|
||||
Params().write_db_value("DoUninstall", "1");
|
||||
}
|
||||
});
|
||||
|
||||
QWidget *widget = new QWidget;
|
||||
widget->setLayout(device_layout);
|
||||
widget->setStyleSheet(R"(
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
btn.setStyleSheet(R"(
|
||||
padding: 0;
|
||||
border-radius: 50px;
|
||||
font-size: 40px;
|
||||
font-size: 35px;
|
||||
font-weight: 500;
|
||||
color: #E4E4E4;
|
||||
background-color: #393939;
|
||||
|
||||
Reference in New Issue
Block a user