Commit 2d3431ae authored by David Edmundson's avatar David Edmundson

Expose AbstractClient's colorScheme as a property

This exposes colorScheme as a property which is then usable by kwin
Wanted by T9769.

Test Plan:
Michail to test in a script.

Reviewers: #kwin, zzag, graesslin

Reviewed By: #kwin, zzag, graesslin

Subscribers: mvourlakos, zzag, kwin

Tags: #kwin

Differential Revision:
parent e60c8786
......@@ -696,6 +696,7 @@ void AbstractClient::updateColorScheme(QString path)
connect(m_palette.get(), &Decoration::DecorationPalette::changed, this, &AbstractClient::handlePaletteChange);
emit paletteChanged(palette());
emit colorSchemeChanged();
......@@ -278,6 +278,14 @@ class KWIN_EXPORT AbstractClient : public Toplevel
Q_PROPERTY(KWin::TabGroup* tabGroup READ tabGroup NOTIFY tabGroupChanged SCRIPTABLE false)
* The color scheme set on this client
* Absolute file path, or name of palette in the user's config directory following KColorSchemes format.
* An empty string indicates the default palette from kdeglobals is used.
* @Note this indicates the colour scheme requested, which might differ from the theme applied if the colorScheme cannot be found
Q_PROPERTY(QString colorScheme READ colorScheme NOTIFY colorSchemeChanged)
virtual ~AbstractClient();
......@@ -714,6 +722,9 @@ public:
QString applicationMenuObjectPath() const {
return m_applicationMenuObjectPath;
QString colorScheme() const {
return m_colorScheme;
* Request showing the application menu bar
......@@ -750,6 +761,7 @@ Q_SIGNALS:
void clientMinimized(KWin::AbstractClient* client, bool animate);
void clientUnminimized(KWin::AbstractClient* client, bool animate);
void paletteChanged(const QPalette &p);
void colorSchemeChanged();
void captionChanged();
void clientMaximizedStateChanged(KWin::AbstractClient*, MaximizeMode);
void clientMaximizedStateChanged(KWin::AbstractClient* c, bool h, bool v);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment