mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-30 02:52:04 +08:00
UI: add missing QPushButton pressed styles (#28289)
* UI: add missing QPushButton pressed styles * keyboard is special old-commit-hash: 488975f06ec6a282e023dbd5db9e265299458f4c
This commit is contained in:
@@ -111,6 +111,9 @@ void TermsPage::showEvent(QShowEvent *event) {
|
||||
QPushButton {
|
||||
background-color: #465BEA;
|
||||
}
|
||||
QPushButton:pressed {
|
||||
background-color: #3049F4;
|
||||
}
|
||||
QPushButton:disabled {
|
||||
background-color: #4F4F4F;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,14 @@ Reset::Reset(ResetMode mode, QWidget *parent) : QWidget(parent) {
|
||||
#endif
|
||||
|
||||
confirmBtn = new QPushButton(tr("Confirm"));
|
||||
confirmBtn->setStyleSheet("background-color: #465BEA;");
|
||||
confirmBtn->setStyleSheet(R"(
|
||||
QPushButton {
|
||||
background-color: #465BEA;
|
||||
}
|
||||
QPushButton:pressed {
|
||||
background-color: #3049F4;
|
||||
}
|
||||
)");
|
||||
blayout->addWidget(confirmBtn);
|
||||
QObject::connect(confirmBtn, &QPushButton::clicked, this, &Reset::confirm);
|
||||
|
||||
@@ -111,6 +118,9 @@ Reset::Reset(ResetMode mode, QWidget *parent) : QWidget(parent) {
|
||||
border-radius: 10px;
|
||||
background-color: #333333;
|
||||
}
|
||||
QPushButton:pressed {
|
||||
background-color: #444444;
|
||||
}
|
||||
)");
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,14 @@ Updater::Updater(const QString &updater_path, const QString &manifest_path, QWid
|
||||
|
||||
QPushButton *install = new QPushButton(tr("Install"));
|
||||
install->setObjectName("navBtn");
|
||||
install->setStyleSheet("background-color: #465BEA;");
|
||||
install->setStyleSheet(R"(
|
||||
QPushButton {
|
||||
background-color: #465BEA;
|
||||
}
|
||||
QPushButton:pressed {
|
||||
background-color: #3049F4;
|
||||
}
|
||||
)");
|
||||
QObject::connect(install, &QPushButton::clicked, this, &Updater::installUpdate);
|
||||
hlayout->addWidget(install);
|
||||
}
|
||||
@@ -124,6 +131,9 @@ Updater::Updater(const QString &updater_path, const QString &manifest_path, QWid
|
||||
border-radius: 10px;
|
||||
background-color: #333333;
|
||||
}
|
||||
QPushButton#navBtn:pressed {
|
||||
background-color: #444444;
|
||||
}
|
||||
QProgressBar {
|
||||
border: none;
|
||||
background-color: #292929;
|
||||
|
||||
@@ -71,10 +71,15 @@ InputDialog::InputDialog(const QString &title, QWidget *parent, const QString &s
|
||||
QPushButton* cancel_btn = new QPushButton(tr("Cancel"));
|
||||
cancel_btn->setFixedSize(386, 125);
|
||||
cancel_btn->setStyleSheet(R"(
|
||||
font-size: 48px;
|
||||
border-radius: 10px;
|
||||
color: #E4E4E4;
|
||||
background-color: #444444;
|
||||
QPushButton {
|
||||
font-size: 48px;
|
||||
border-radius: 10px;
|
||||
color: #E4E4E4;
|
||||
background-color: #333333;
|
||||
}
|
||||
QPushButton:pressed {
|
||||
background-color: #444444;
|
||||
}
|
||||
)");
|
||||
header_layout->addWidget(cancel_btn, 0, Qt::AlignRight);
|
||||
QObject::connect(cancel_btn, &QPushButton::clicked, this, &InputDialog::reject);
|
||||
|
||||
@@ -59,7 +59,14 @@ KeyboardLayout::KeyboardLayout(QWidget* parent, const std::vector<QVector<QStrin
|
||||
if (p == BACKSPACE_KEY) {
|
||||
btn->setAutoRepeat(true);
|
||||
} else if (p == ENTER_KEY) {
|
||||
btn->setStyleSheet("background-color: #465BEA;");
|
||||
btn->setStyleSheet(R"(
|
||||
QPushButton {
|
||||
background-color: #465BEA;
|
||||
}
|
||||
QPushButton:pressed {
|
||||
background-color: #444444;
|
||||
}
|
||||
)");
|
||||
}
|
||||
btn->setFixedHeight(135 + key_spacing_vertical);
|
||||
btn_group->addButton(btn);
|
||||
|
||||
Reference in New Issue
Block a user