1
0

feat: change application style

- change default dark theme to light
- disable dark mode on windows 10 because Qt's windows 11 theme has bad support on windows 10 (icon display error)
- level required minimum qt version up to 6.5 for color schema.
This commit is contained in:
2026-07-08 20:15:22 +08:00
parent c06f900ac5
commit 46f46480cb
10 changed files with 139 additions and 33 deletions

View File

@@ -15,35 +15,25 @@ BottomButtonGroup::BottomButtonGroup(const std::vector<QAction *> &actionList, Q
mainLayout->setSizeConstraint(QLayout::SetFixedSize);
this->setLayout(mainLayout);
this->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
this->setStyleSheet("BottomButtonGroup {"
"border: 1px solid gray;"
"border-top-left-radius: 10px;"
"border-top-right-radius: 10px;"
"border-style: none;"
"background-color:rgba(0,0,0,120)"
"}"
"QToolButton {"
"background:transparent;"
"}"
"QToolButton:!focus {"
"border-style: none;"
"}");
this->setStyleSheet(R"#(
BottomButtonGroup {
border-style: none;
background: transparent;
}
QToolButton {
background: transparent;
border-style: none;
}
)#");
auto newActionBtn = [this](QAction * action) -> QToolButton * {
for (QAction * action : actionList) {
// Create button
QToolButton * btn = new QToolButton(this);
btn->setDefaultAction(action);
btn->setIconSize(QSize(32, 32));
btn->setFixedSize(40, 40);
return btn;
};
for (QAction * action : actionList) {
addButton(newActionBtn(action));
// Add button
layout()->addWidget(btn);
}
}
void BottomButtonGroup::addButton(QAbstractButton *button)
{
layout()->addWidget(button);
updateGeometry();
}