on xenial help sign in
fix workspace preview scaling
commitb9739cbe38fc987322435abedd51af0b1623e3db authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 9 Mar 2017, 18:54 (10 years ago) parent9b5b6c1
2 files changed+5−8
qml/Stage/Spread/ScreensAndWorkspaces.qml+1−5 qml/Stage/Spread/Workspaces.qml+4−3
qml/Stage/Spread/ScreensAndWorkspaces.qml+1−5
@@ -26,7 +26,6 @@ Item {
2626 delegate: Item {
2727 height: root.height - units.gu(6)
2828 width: workspaces.width
29−// clip: true
3029
3130 UbuntuShape {
3231 id: header
@@ -70,7 +69,7 @@ Item {
7069 }
7170
7271 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
7473 color: "black"
7574 fontSize: "x-small"
7675 }
@@ -78,11 +77,8 @@ Item {
7877
7978 MouseArea {
8079 anchors.fill: parent
81−// acceptedButtons: Qt.RightButton
82−
8380
8481 onClicked: {
85− print("should open popup")
8682 PopupUtils.open(contextMenu)
8783 }
8884 }
qml/Stage/Spread/Workspaces.qml+4−3
@@ -70,7 +70,8 @@ Item {
7070 leftMargin: itemWidth
7171 rightMargin: itemWidth
7272
73− property int itemWidth: height * screen.physicalSize.width / screen.physicalSize.height
73+ property var screenSize: screen.availableModes[screen.currentModeIndex].size
74+ property int itemWidth: height * screenSize.width / screenSize.height
7475 property int foldingAreaWidth: units.gu(10)
7576 property real realContentX: contentX - originX + leftMargin
7677 property int dropItemIndex: -1
@@ -185,7 +186,7 @@ Item {
185186 height: listView.height
186187 width: listView.itemWidth
187188 background: root.background
188− screenHeight: root.screen.physicalSize.height
189+ screenHeight: screen.availableModes[screen.currentModeIndex].size.height
189190 containsDrag: listView.hoveredWorkspaceIndex == index
190191 }
191192 MouseArea {
@@ -299,7 +300,7 @@ Item {
299300 height: listView.height
300301 width: listView.itemWidth
301302 background: root.background
302− screenHeight: root.screen.physicalSize.height
303+ screenHeight: screen.availableModes[screen.currentModeIndex].size.height
303304 visible: Drag.active
304305
305306 Drag.active: hoverMouseArea.drag.active