Merge branch 'Plasma/5.9'

This commit is contained in:
Kai Uwe Broulik 2017-03-22 16:52:27 +01:00
commit d491ee79e3
3 changed files with 4 additions and 4 deletions

View file

@ -21,7 +21,7 @@ import org.kde.kwin.decoration 0.1
DecorationButton {
id: appMenuButton
buttonType: DecorationOptions.DecorationButtonApplicationMenu
visible: false //decoration.appMenu
visible: decoration.client.hasApplicationMenu
KQuickControlsAddons.QIconItem {
icon: decoration.client.icon
anchors.fill: parent

View file

@ -62,7 +62,8 @@ Item {
break;
case DecorationOptions.DecorationButtonApplicationMenu:
// app menu
// decoration.appMenuClicked();
var pos = button.mapToItem(null, 0, 0); // null = "map to scene"
decoration.requestShowApplicationMenu(Qt.rect(pos.x, pos.y, button.width, button.height), 0)
break;
case DecorationOptions.DecorationButtonOnAllDesktops:
// all desktops

View file

@ -144,8 +144,7 @@ DecorationButton {
visible = Qt.binding(function() { return decoration.client.providesContextHelp});
}
if (buttonType == DecorationOptions.DecorationButtonApplicationMenu) {
// visible = decoration.appMenu;
visible = false;
visible = Qt.binding(function() { return decoration.client.hasApplicationMenu; });
}
}
onHoveredChanged: colorize()