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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user