on xenial help sign in
some improvements
67df091Michael Zanetti
qml/Stage/Spread/ScreensAndWorkspaces.qml+8−1
@@ -106,7 +106,14 @@ Item {
106 Workspaces {
106 Workspaces {
107 id: workspaces
107 id: workspaces
108 height: parent.height - header.height - units.gu(2)
108 height: parent.height - header.height - units.gu(2)
109+ width: {
110+ if (screensProxy.count == 0) {
111+ return Math.min(implicitWidth, root.width - units.gu(8));
112+ }
113+ // TODO: needs better logic: If this is the active/current screen, make it wide, otherwise narrow
109− width: Math.min(implicitWidth, index == 0 ? units.gu(80) : units.gu(40), root.width)
114+ return Math.min(implicitWidth, index == 0 ? units.gu(80) : units.gu(40), root.width)
115+ }
116+
110 Behavior on width { UbuntuNumberAnimation {} }
117 Behavior on width { UbuntuNumberAnimation {} }
111 anchors.bottom: parent.bottom
118 anchors.bottom: parent.bottom
112 anchors.bottomMargin: units.gu(1)
119 anchors.bottomMargin: units.gu(1)
qml/Stage/Spread/Spread.qml+1−2
@@ -93,8 +93,7 @@ Item {
93
93
94 readonly property real spreadTotalWidth: Math.max(2,totalItemCount) * spreadWidth / visibleItemCount
94 readonly property real spreadTotalWidth: Math.max(2,totalItemCount) * spreadWidth / visibleItemCount
95
95
96− readonly property real centeringOffset: Math.max(spreadWidth - spreadTotalWidth ,0) / (2 * spreadWidth)
96+ readonly property real centeringOffset: Math.max(spreadWidth - spreadTotalWidth + leftStackXPos * 2, 0) / (2 * spreadWidth)
97−
98
97
99 readonly property var curve: BezierCurve {
98 readonly property var curve: BezierCurve {
100 controlPoint2: {'x': 0.19, 'y': 0.00}
99 controlPoint2: {'x': 0.19, 'y': 0.00}
qml/Stage/Spread/Workspaces.qml+3−4
@@ -6,8 +6,7 @@ import "../../Components"
6
6
7Item {
7Item {
8 id: root
8 id: root
9− implicitWidth: listView.count * (height * 16/9 + listView.spacing) - listView.spacing
9+ implicitWidth: listView.contentWidth
10−// color: "blue"
11
10
12 property QtObject screen: null
11 property QtObject screen: null
13 property alias workspaceModel: listView.model
12 property alias workspaceModel: listView.model
@@ -71,7 +70,7 @@ Item {
71 leftMargin: itemWidth
70 leftMargin: itemWidth
72 rightMargin: itemWidth
71 rightMargin: itemWidth
73
72
74− property int itemWidth: height * 16 / 9
73+ property int itemWidth: height * screen.physicalSize.width / screen.physicalSize.height
75 property int foldingAreaWidth: units.gu(10)
74 property int foldingAreaWidth: units.gu(10)
76 property real realContentX: contentX - originX + leftMargin
75 property real realContentX: contentX - originX + leftMargin
77 property int dropItemIndex: -1
76 property int dropItemIndex: -1
@@ -264,7 +263,7 @@ Item {
264 }
263 }
265
264
266 onClicked: {
265 onClicked: {
267− WorkspaceManager.activeWorkspace = fakeDragItem.workspace
266+ screenWindow.screen.activeWorkspace = fakeDragItem.workspace
268 }
267 }
269
268
270 WorkspacePreview {
269 WorkspacePreview {