@@ -81,19 +81,47 @@ Item {
81 anchors.fill: parent
81 anchors.fill: parent
83 onClicked: {
83 onClicked: {
84− PopupUtils.open(contextMenu)
84+// PopupUtils.open(contextMenu)
85+ var obj = screensMenuComponent.createObject(header)
86+ obj.open(mouseX, mouseY)
88 Component {
90 Component {
89− id: contextMenu
91+ id: screensMenuComponent
90− ActionSelectionPopover {
92+ UbuntuShape {
91− actions: ActionList {
93+ id: screensMenu
92− Action {
94+ width: units.gu(20)
95+ height: contentColumn.childrenRect.height
96+ backgroundColor: "white"
98+ function open(mouseX, mouseY) {
99+ x = Math.max(0, Math.min(mouseX - width / 2, parent.width - width))
100+ y = mouseY + units.gu(1)
104+ anchors.fill: parent
106+ screensMenu.destroy()
114+ height: layout.height
115+ highlightColor: "transparent"
93− text: "Add workspace"
118+ title.text: qsTr("Add workspace")
94− onTriggered: {
119+ title.color: "black"
95 screen.addWorkspace();
122 screen.addWorkspace();
96− Screens.sync(root.screensProxy)
123+ Screens.sync(root.screensProxy);
124+ screensMenu.destroy();
@@ -101,7 +129,6 @@ Item {
105 Workspaces {
132 Workspaces {
106 id: workspaces
133 id: workspaces
107 height: parent.height - header.height - units.gu(2)
134 height: parent.height - header.height - units.gu(2)