[aurorae] Handle client palette changes
When the client's palette changes we need to update the internal colors and emit a colorChanged, so that the decoration can repaint. BUG: 357311 FIXED-IN: 5.5.5 REVIEW: 126891
This commit is contained in:
parent
11514079ea
commit
3434358acd
2 changed files with 8 additions and 0 deletions
clients/aurorae/src
|
@ -172,9 +172,16 @@ void DecorationOptions::setDecoration(KDecoration2::Decoration *decoration)
|
|||
disconnect(s.data(), &KDecoration2::DecorationSettings::fontChanged, this, &DecorationOptions::fontChanged);
|
||||
disconnect(s.data(), &KDecoration2::DecorationSettings::decorationButtonsLeftChanged, this, &DecorationOptions::titleButtonsChanged);
|
||||
disconnect(s.data(), &KDecoration2::DecorationSettings::decorationButtonsRightChanged, this, &DecorationOptions::titleButtonsChanged);
|
||||
disconnect(m_paletteConnection);
|
||||
}
|
||||
m_decoration = decoration;
|
||||
connect(m_decoration->client().data(), &KDecoration2::DecoratedClient::activeChanged, this, &DecorationOptions::slotActiveChanged);
|
||||
m_paletteConnection = connect(m_decoration->client().data(), &KDecoration2::DecoratedClient::paletteChanged, this,
|
||||
[this] (const QPalette &pal) {
|
||||
m_colors.update(pal);
|
||||
emit colorsChanged();
|
||||
}
|
||||
);
|
||||
auto s = m_decoration->settings();
|
||||
connect(s.data(), &KDecoration2::DecorationSettings::fontChanged, this, &DecorationOptions::fontChanged);
|
||||
connect(s.data(), &KDecoration2::DecorationSettings::decorationButtonsLeftChanged, this, &DecorationOptions::titleButtonsChanged);
|
||||
|
|
|
@ -244,6 +244,7 @@ private:
|
|||
bool m_active;
|
||||
KDecoration2::Decoration *m_decoration;
|
||||
ColorSettings m_colors;
|
||||
QMetaObject::Connection m_paletteConnection;
|
||||
};
|
||||
|
||||
class Borders : public QObject
|
||||
|
|
Loading…
Reference in a new issue