From 11b5cfa4229ac722661e82822e4aaa649172f24d Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Wed, 23 Aug 2023 05:00:01 +0800 Subject: [PATCH] ui/settings: Don't apply styles to more elements than needed. (#29463) old-commit-hash: 5765c1d978c5890513e55398490447590d3b1d3e --- selfdrive/ui/qt/offroad/settings.cc | 8 ++++---- selfdrive/ui/qt/widgets/controls.cc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/selfdrive/ui/qt/offroad/settings.cc b/selfdrive/ui/qt/offroad/settings.cc index 3dd5a52d86..05aef8364c 100644 --- a/selfdrive/ui/qt/offroad/settings.cc +++ b/selfdrive/ui/qt/offroad/settings.cc @@ -348,10 +348,6 @@ SettingsWindow::SettingsWindow(QWidget *parent) : QFrame(parent) { QVBoxLayout *sidebar_layout = new QVBoxLayout(sidebar_widget); sidebar_layout->setMargin(0); panel_widget = new QStackedWidget(); - panel_widget->setStyleSheet(R"( - border-radius: 30px; - background-color: #292929; - )"); // close button QPushButton *close_btn = new QPushButton(tr("×")); @@ -440,5 +436,9 @@ SettingsWindow::SettingsWindow(QWidget *parent) : QFrame(parent) { SettingsWindow { background-color: black; } + QStackedWidget, ScrollView { + background-color: #292929; + border-radius: 30px; + } )"); } diff --git a/selfdrive/ui/qt/widgets/controls.cc b/selfdrive/ui/qt/widgets/controls.cc index e440bc6441..87304a4585 100644 --- a/selfdrive/ui/qt/widgets/controls.cc +++ b/selfdrive/ui/qt/widgets/controls.cc @@ -23,7 +23,7 @@ AbstractControl::AbstractControl(const QString &title, const QString &desc, cons // title title_label = new QPushButton(title); title_label->setFixedHeight(120); - title_label->setStyleSheet("font-size: 50px; font-weight: 400; text-align: left"); + title_label->setStyleSheet("font-size: 50px; font-weight: 400; text-align: left; border: none;"); hlayout->addWidget(title_label, 1); // value next to control button