on xenial help sign in
add initial workspaces visuals
45fa1e6Michael Zanetti
qml/Stages/DesktopStage.qml+50−1
@@ -35,7 +35,7 @@ FocusScope {
35 onAltTabPressedChanged: {
35 onAltTabPressedChanged: {
36 print("Alt+Tab pressed:", altTabPressed)
36 print("Alt+Tab pressed:", altTabPressed)
37 if (altTabPressed) {
37 if (altTabPressed) {
38− appRepeater.highlightedIndex = 1;
38+ appRepeater.highlightedIndex = Math.min(ApplicationManager.count - 1, 1);
39 } else {
39 } else {
40 print("focusing app", appRepeater.highlightedIndex)
40 print("focusing app", appRepeater.highlightedIndex)
41 ApplicationManager.requestFocusApplication(ApplicationManager.get(appRepeater.highlightedIndex).appId)
41 ApplicationManager.requestFocusApplication(ApplicationManager.get(appRepeater.highlightedIndex).appId)
@@ -292,6 +292,47 @@ FocusScope {
292 }
292 }
293 }
293 }
294
294
295+ Rectangle {
296+ id: workspaceSelector
297+ anchors {
298+ left: parent.left
299+ top: parent.top
300+ right: parent.right
301+ }
302+ height: root.height / 3
303+ color: "#55000000"
304+ opacity: 0
305+
306+ RowLayout {
307+ anchors {
308+ fill: parent
309+ topMargin: units.gu(9)
310+ bottomMargin: units.gu(5)
311+ }
312+ spacing: units.gu(5)
313+ Item { Layout.fillWidth: true }
314+ Repeater {
315+ model: 2 // TODO: should be workspacemodel
316+ Image {
317+ Layout.fillHeight: true
318+ Layout.preferredWidth: height * root.width / root.height
319+ source: root.background
320+ }
321+ }
322+ Rectangle {
323+ Layout.fillHeight: true
324+ Layout.preferredWidth: height * root.width / root.height
325+ color: "#22ffffff"
326+ Label {
327+ anchors.centerIn: parent
328+ font.pixelSize: parent.height / 2
329+ text: "+"
330+ }
331+ }
332+ Item { Layout.fillWidth: true }
333+ }
334+ }
335+
295 Label {
336 Label {
296 anchors { left: parent.left; bottom: parent.bottom; margins: units.gu(1) }
337 anchors { left: parent.left; bottom: parent.bottom; margins: units.gu(1) }
297 text: "Progress: " + (spreadFlickable.contentX / (spreadFlickable.contentWidth - spreadFlickable.width)).toFixed(3) +
338 text: "Progress: " + (spreadFlickable.contentX / (spreadFlickable.contentWidth - spreadFlickable.width)).toFixed(3) +
@@ -311,6 +352,7 @@ FocusScope {
311 State {
352 State {
312 name: "altTab"; when: root.altTabPressed
353 name: "altTab"; when: root.altTabPressed
313 PropertyChanges { target: spreadFlickable; visible: true }
354 PropertyChanges { target: spreadFlickable; visible: true }
355+ PropertyChanges { target: workspaceSelector; opacity: 1 }
314 }
356 }
315 ]
357 ]
316 transitions: [
358 transitions: [
@@ -318,6 +360,13 @@ FocusScope {
318 from: "*"
360 from: "*"
319 to: "altTab"
361 to: "altTab"
320 PropertyAction { target: spreadFlickable; property: "contentX"; value: 0 }
362 PropertyAction { target: spreadFlickable; property: "contentX"; value: 0 }
363+ PropertyAnimation { property: "opacity" }
364+ },
365+ Transition {
366+ from: "*"
367+ to: "*"
368+ PropertyAnimation { property: "opacity" }
321 }
369 }
370+
322 ]
371 ]
323}
372}