small style improvement in settings

old-commit-hash: 647c5804b8e8fc4cc0c43ec32d60ea0468ddb4df
This commit is contained in:
Adeeb Shihadeh
2021-03-22 04:03:11 -07:00
parent c360723411
commit e2eb4034f5
2 changed files with 14 additions and 10 deletions

View File

@@ -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"(

View File

@@ -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;