on xenial help sign in
fix workspace preview scaling
b9739cbMichael Zanetti
qml/Stage/Spread/ScreensAndWorkspaces.qml+1−5
@@ -26,7 +26,6 @@ Item {
26 delegate: Item {
26 delegate: Item {
27 height: root.height - units.gu(6)
27 height: root.height - units.gu(6)
28 width: workspaces.width
28 width: workspaces.width
29−// clip: true
30
29
31 UbuntuShape {
30 UbuntuShape {
32 id: header
31 id: header
@@ -70,7 +69,7 @@ Item {
70 }
69 }
71
70
72 Label {
71 Label {
73− text: model.screen.physicalSize.width + "x" + model.screen.physicalSize.height
72+ text: screen.availableModes[screen.currentModeIndex].size.width + "x" + screen.availableModes[screen.currentModeIndex].size.height
74 color: "black"
73 color: "black"
75 fontSize: "x-small"
74 fontSize: "x-small"
76 }
75 }
@@ -78,11 +77,8 @@ Item {
78
77
79 MouseArea {
78 MouseArea {
80 anchors.fill: parent
79 anchors.fill: parent
81−// acceptedButtons: Qt.RightButton
82−
83
80
84 onClicked: {
81 onClicked: {
85− print("should open popup")
86 PopupUtils.open(contextMenu)
82 PopupUtils.open(contextMenu)
87 }
83 }
88 }
84 }
qml/Stage/Spread/Workspaces.qml+4−3
@@ -70,7 +70,8 @@ Item {
70 leftMargin: itemWidth
70 leftMargin: itemWidth
71 rightMargin: itemWidth
71 rightMargin: itemWidth
72
72
73+ property var screenSize: screen.availableModes[screen.currentModeIndex].size
73− property int itemWidth: height * screen.physicalSize.width / screen.physicalSize.height
74+ property int itemWidth: height * screenSize.width / screenSize.height
74 property int foldingAreaWidth: units.gu(10)
75 property int foldingAreaWidth: units.gu(10)
75 property real realContentX: contentX - originX + leftMargin
76 property real realContentX: contentX - originX + leftMargin
76 property int dropItemIndex: -1
77 property int dropItemIndex: -1
@@ -185,7 +186,7 @@ Item {
185 height: listView.height
186 height: listView.height
186 width: listView.itemWidth
187 width: listView.itemWidth
187 background: root.background
188 background: root.background
188− screenHeight: root.screen.physicalSize.height
189+ screenHeight: screen.availableModes[screen.currentModeIndex].size.height
189 containsDrag: listView.hoveredWorkspaceIndex == index
190 containsDrag: listView.hoveredWorkspaceIndex == index
190 }
191 }
191 MouseArea {
192 MouseArea {
@@ -299,7 +300,7 @@ Item {
299 height: listView.height
300 height: listView.height
300 width: listView.itemWidth
301 width: listView.itemWidth
301 background: root.background
302 background: root.background
302− screenHeight: root.screen.physicalSize.height
303+ screenHeight: screen.availableModes[screen.currentModeIndex].size.height
303 visible: Drag.active
304 visible: Drag.active
304
305
305 Drag.active: hoverMouseArea.drag.active
306 Drag.active: hoverMouseArea.drag.active