Merge branch 'Plasma/5.9'
This commit is contained in:
commit
d491ee79e3
3 changed files with 4 additions and 4 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue