|
|
b5cc75 |
diff --git a/kwin/clients/aurorae/themes/plastik/package/contents/ui/main.qml b/kwin/clients/aurorae/themes/plastik/package/contents/ui/main.qml
|
|
|
b5cc75 |
index 77676bf..6772d06 100644
|
|
|
b5cc75 |
--- a/kwin/clients/aurorae/themes/plastik/package/contents/ui/main.qml
|
|
|
b5cc75 |
+++ b/kwin/clients/aurorae/themes/plastik/package/contents/ui/main.qml
|
|
|
b5cc75 |
@@ -19,6 +19,29 @@ import org.kde.kwin.decoration 0.1
|
|
|
b5cc75 |
import org.kde.kwin.decorations.plastik 1.0
|
|
|
b5cc75 |
|
|
|
b5cc75 |
Decoration {
|
|
|
b5cc75 |
+ function removeDisabledButtons(buttons) {
|
|
|
b5cc75 |
+ var btns = "";
|
|
|
b5cc75 |
+ for (var i = 0; i < buttons.length; i++) {
|
|
|
b5cc75 |
+ if (buttons[i] == 'I') {
|
|
|
b5cc75 |
+ if (!decoration.minimizeable) {
|
|
|
b5cc75 |
+ continue;
|
|
|
b5cc75 |
+ }
|
|
|
b5cc75 |
+ }
|
|
|
b5cc75 |
+ if (buttons[i] == 'A') {
|
|
|
b5cc75 |
+ if (!decoration.maximizeable) {
|
|
|
b5cc75 |
+ continue;
|
|
|
c49bd3 |
+ }
|
|
|
b5cc75 |
+ }
|
|
|
b5cc75 |
+ if (buttons[i] == 'X') {
|
|
|
b5cc75 |
+ if (!decoration.closeable) {
|
|
|
b5cc75 |
+ continue;
|
|
|
b5cc75 |
+ }
|
|
|
b5cc75 |
+ }
|
|
|
b5cc75 |
+ btns += buttons[i];
|
|
|
b5cc75 |
+ }
|
|
|
b5cc75 |
+ return btns;
|
|
|
b5cc75 |
+ }
|
|
|
b5cc75 |
+
|
|
|
b5cc75 |
function readConfig() {
|
|
|
b5cc75 |
switch (decoration.readConfig("BorderSize", DecorationOptions.BorderNormal)) {
|
|
|
b5cc75 |
case DecorationOptions.BorderTiny:
|
|
|
b5cc75 |
@@ -263,11 +286,13 @@ Decoration {
|
|
|
b5cc75 |
shadeButton: shadeButtonComponent
|
|
|
b5cc75 |
allDesktopsButton: stickyButtonComponent
|
|
|
b5cc75 |
closeButton: closeButtonComponent
|
|
|
b5cc75 |
- buttons: options.titleButtonsLeft
|
|
|
b5cc75 |
anchors {
|
|
|
b5cc75 |
top: parent.top
|
|
|
b5cc75 |
left: parent.left
|
|
|
b5cc75 |
}
|
|
|
b5cc75 |
+ Component.onCompleted: {
|
|
|
b5cc75 |
+ buttons = removeDisabledButtons(options.titleButtonsLeft);
|
|
|
b5cc75 |
+ }
|
|
|
b5cc75 |
}
|
|
|
b5cc75 |
Text {
|
|
|
b5cc75 |
id: caption
|
|
|
b5cc75 |
@@ -304,11 +329,13 @@ Decoration {
|
|
|
b5cc75 |
shadeButton: shadeButtonComponent
|
|
|
b5cc75 |
allDesktopsButton: stickyButtonComponent
|
|
|
b5cc75 |
closeButton: closeButtonComponent
|
|
|
b5cc75 |
- buttons: options.titleButtonsRight
|
|
|
b5cc75 |
anchors {
|
|
|
b5cc75 |
top: parent.top
|
|
|
b5cc75 |
right: parent.right
|
|
|
b5cc75 |
}
|
|
|
b5cc75 |
+ Component.onCompleted: {
|
|
|
b5cc75 |
+ buttons = removeDisabledButtons(options.titleButtonsRight);
|
|
|
b5cc75 |
+ }
|
|
|
b5cc75 |
}
|
|
|
b5cc75 |
}
|
|
|
b5cc75 |
}
|