diff --git a/src/plugins/kdecorations/aurorae/src/lib/auroraetheme.cpp b/src/plugins/kdecorations/aurorae/src/lib/auroraetheme.cpp index 9dc21053e2..4a5b11cea8 100644 --- a/src/plugins/kdecorations/aurorae/src/lib/auroraetheme.cpp +++ b/src/plugins/kdecorations/aurorae/src/lib/auroraetheme.cpp @@ -120,6 +120,7 @@ void AuroraeTheme::loadTheme(const QString &name, const KConfig &config) d->initButtonFrame(KeepBelowButton); d->initButtonFrame(ShadeButton); d->initButtonFrame(HelpButton); + d->initButtonFrame(AppMenuButton); d->themeConfig.load(config); Q_EMIT themeChanged(); @@ -411,6 +412,7 @@ BUTTON_PATH(keepAboveButtonPath, KeepAboveButton) BUTTON_PATH(keepBelowButtonPath, KeepBelowButton) BUTTON_PATH(shadeButtonPath, ShadeButton) BUTTON_PATH(helpButtonPath, HelpButton) +BUTTON_PATH(appMenuButtonPath, AppMenuButton) #undef BUTTON_PATH diff --git a/src/plugins/kdecorations/aurorae/src/lib/auroraetheme.h b/src/plugins/kdecorations/aurorae/src/lib/auroraetheme.h index 110727edc0..136720b47f 100644 --- a/src/plugins/kdecorations/aurorae/src/lib/auroraetheme.h +++ b/src/plugins/kdecorations/aurorae/src/lib/auroraetheme.h @@ -98,6 +98,7 @@ class /*LIBAURORAE_EXPORT*/ AuroraeTheme : public QObject Q_PROPERTY(QString keepBelowButtonPath READ keepBelowButtonPath NOTIFY themeChanged) Q_PROPERTY(QString shadeButtonPath READ shadeButtonPath NOTIFY themeChanged) Q_PROPERTY(QString helpButtonPath READ helpButtonPath NOTIFY themeChanged) + Q_PROPERTY(QString appMenuButtonPath READ appMenuButtonPath NOTIFY themeChanged) Q_PROPERTY(QColor activeTextColor READ activeTextColor NOTIFY themeChanged) Q_PROPERTY(QColor inactiveTextColor READ inactiveTextColor NOTIFY themeChanged) Q_PROPERTY(Qt::Alignment horizontalAlignment READ alignment NOTIFY themeChanged) @@ -156,6 +157,7 @@ public: QString keepBelowButtonPath() const; QString shadeButtonPath() const; QString helpButtonPath() const; + QString appMenuButtonPath() const; QColor activeTextColor() const; QColor inactiveTextColor() const; Qt::Alignment alignment() const; diff --git a/src/plugins/kdecorations/aurorae/src/qml/AppMenuButton.qml b/src/plugins/kdecorations/aurorae/src/qml/AppMenuButton.qml index 8a5e6dbe2d..d7dd7c0bfb 100644 --- a/src/plugins/kdecorations/aurorae/src/qml/AppMenuButton.qml +++ b/src/plugins/kdecorations/aurorae/src/qml/AppMenuButton.qml @@ -7,12 +7,23 @@ import QtQuick import org.kde.kirigami 2.20 as Kirigami import org.kde.kwin.decoration -DecorationButton { +Item { id: appMenuButton - buttonType: DecorationOptions.DecorationButtonApplicationMenu visible: decoration.client.hasApplicationMenu - Kirigami.Icon { + AuroraeButton { + id: primary anchors.fill: parent - source: decoration.client.icon + buttonType: DecorationOptions.DecorationButtonApplicationMenu + visible: auroraeTheme.appMenuButtonPath + } + DecorationButton { + id: fallback + anchors.fill: parent + buttonType: DecorationOptions.DecorationButtonApplicationMenu + visible: !auroraeTheme.appMenuButtonPath + Kirigami.Icon { + anchors.fill: parent + source: decoration.client.icon + } } } diff --git a/src/plugins/kdecorations/aurorae/src/qml/AuroraeButton.qml b/src/plugins/kdecorations/aurorae/src/qml/AuroraeButton.qml index a7960f9586..eb04394498 100644 --- a/src/plugins/kdecorations/aurorae/src/qml/AuroraeButton.qml +++ b/src/plugins/kdecorations/aurorae/src/qml/AuroraeButton.qml @@ -52,6 +52,9 @@ DecorationButton { case DecorationOptions.DecorationButtonQuickHelp: // help return auroraeTheme.helpButtonPath; + case DecorationOptions.DecorationButtonApplicationMenu: + // app menu + return auroraeTheme.appMenuButtonPath; case DecorationOptions.DecorationButtonMinimize: // minimize return auroraeTheme.minimizeButtonPath;