Skip to content

Commit

Permalink
Fix Switch theme change
Browse files Browse the repository at this point in the history
  • Loading branch information
oclero committed Nov 11, 2024
1 parent 46e27ef commit 44979fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/widgets/Switch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ void Switch::enterEvent(QEnterEvent* e) {

void Switch::changeEvent(QEvent* e) {
QAbstractButton::changeEvent(e);
if (e->type() == QEvent::Type::EnabledChange) {
const auto type = e->type();
if (type == QEvent::Type::EnabledChange || type == QEvent::Type::PaletteChange
|| type == QEvent::Type::ApplicationPaletteChange) {
startAnimation();
}
}
Expand Down

0 comments on commit 44979fc

Please sign in to comment.