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 { DecorationButton {
id: appMenuButton id: appMenuButton
buttonType: DecorationOptions.DecorationButtonApplicationMenu buttonType: DecorationOptions.DecorationButtonApplicationMenu
visible: false //decoration.appMenu visible: decoration.client.hasApplicationMenu
KQuickControlsAddons.QIconItem { KQuickControlsAddons.QIconItem {
icon: decoration.client.icon icon: decoration.client.icon
anchors.fill: parent anchors.fill: parent

View file

@ -62,7 +62,8 @@ Item {
break; break;
case DecorationOptions.DecorationButtonApplicationMenu: case DecorationOptions.DecorationButtonApplicationMenu:
// app menu // 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; break;
case DecorationOptions.DecorationButtonOnAllDesktops: case DecorationOptions.DecorationButtonOnAllDesktops:
// all desktops // all desktops

View file

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