on xenial help sign in
make it work with the real ApplicationManager
ae38fdaMichael Zanetti
qml/Components/BlurLayer.qml+1−1
@@ -38,7 +38,7 @@ Item {
38 {
38 {
39 highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
39 highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
40 highp vec4 scaledColor = sourceColor * vec4(0.3, 0.59, 0.11, 1.0);
40 highp vec4 scaledColor = sourceColor * vec4(0.3, 0.59, 0.11, 1.0);
41− float luminance = scaledColor.r + scaledColor.g + scaledColor.b ;
41+ lowp float luminance = scaledColor.r + scaledColor.g + scaledColor.b ;
42 gl_FragColor = mix(vec4(luminance, luminance, luminance, sourceColor.a), sourceColor, saturationValue);
42 gl_FragColor = mix(vec4(luminance, luminance, luminance, sourceColor.a), sourceColor, saturationValue);
43 }"
43 }"
44 }
44 }
qml/Stages/ApplicationWindow.qml+3
@@ -20,6 +20,8 @@ import Unity.Application 0.1
20
20
21FocusScope {
21FocusScope {
22 id: root
22 id: root
23+ implicitWidth: sessionContainer.implicitWidth
24+ implicitHeight: sessionContainer.implicitHeight
23
25
24 // to be read from outside
26 // to be read from outside
25 readonly property bool fullscreen: application ? application.fullscreen : false
27 readonly property bool fullscreen: application ? application.fullscreen : false
@@ -29,6 +31,7 @@ FocusScope {
29 // to be set from outside
31 // to be set from outside
30 property QtObject application
32 property QtObject application
31 property int surfaceOrientationAngle
33 property int surfaceOrientationAngle
34+ property alias resizeSurface: sessionContainer.resizeSurface
32
35
33 QtObject {
36 QtObject {
34 id: d
37 id: d
qml/Stages/DesktopSpreadDelegate.qml+4−3
@@ -29,8 +29,8 @@ Item {
29 property bool highlightShown: false
29 property bool highlightShown: false
30 property real shadowOpacity: 1
30 property real shadowOpacity: 1
31
31
32− property int windowWidth: width
32+ property int windowWidth: application.session.surface.size.width
33− property int windowHeight: height
33+ property int windowHeight: application.session.surface.size.height
34
34
35 state: "normal"
35 state: "normal"
36 states: [
36 states: [
@@ -93,7 +93,8 @@ Item {
93 width: root.windowWidth
93 width: root.windowWidth
94 height: root.windowHeight
94 height: root.windowHeight
95 interactive: false
95 interactive: false
96+ resizeSurface: false
96− focus: true
97+ focus: false
97
98
98 property real itemScale: 1
99 property real itemScale: 1
99 transform: [
100 transform: [
qml/Stages/DesktopStage.qml+9−11
@@ -109,13 +109,6 @@ Rectangle {
109 value: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.state === "maximized"
109 value: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.state === "maximized"
110 }
110 }
111
111
112− Rectangle {
113− id: spreadBackground
114− anchors.fill: parent
115− color: "#55000000"
116− visible: false
117− }
118−
119 FocusScope {
112 FocusScope {
120 id: appContainer
113 id: appContainer
121 objectName: "appContainer"
114 objectName: "appContainer"
@@ -295,6 +288,13 @@ Rectangle {
295 visible: false
288 visible: false
296 }
289 }
297
290
291+ Rectangle {
292+ id: spreadBackground
293+ anchors.fill: parent
294+ color: "#55000000"
295+ visible: false
296+ }
297+
298 Item {
298 Item {
299 id: spreadContainer
299 id: spreadContainer
300 visible: false
300 visible: false
@@ -340,9 +340,9 @@ Rectangle {
340 objectName: "clippedSpreadDelegate"
340 objectName: "clippedSpreadDelegate"
341 anchors.left: parent.left
341 anchors.left: parent.left
342 anchors.top: parent.top
342 anchors.top: parent.top
343− windowWidth: parent.width
344− windowHeight: parent.height
345 application: ApplicationManager.get(index)
343 application: ApplicationManager.get(index)
344+ width: spreadMaths.spreadHeight
345+ height: spreadMaths.spreadHeight
346
346
347 transform: [
347 transform: [
348 Scale {
348 Scale {
@@ -397,8 +397,6 @@ Rectangle {
397 target: clippedSpreadDelegate
397 target: clippedSpreadDelegate
398 highlightShown: index == spreadRepeater.highlightedIndex
398 highlightShown: index == spreadRepeater.highlightedIndex
399 state: "transformed"
399 state: "transformed"
400− width: spreadMaths.spreadHeight
401− height: spreadMaths.spreadHeight
402 shadowOpacity: spreadMaths.shadowOpacity
400 shadowOpacity: spreadMaths.shadowOpacity
403 anchors.topMargin: units.gu(2)
401 anchors.topMargin: units.gu(2)
404 }
402 }
qml/Stages/SessionContainer.qml+3
@@ -20,11 +20,14 @@ import "Animations"
20FocusScope {
20FocusScope {
21 id: root
21 id: root
22 objectName: "sessionContainer"
22 objectName: "sessionContainer"
23+ implicitWidth: _surfaceContainer.implicitWidth
24+ implicitHeight: _surfaceContainer.implicitHeight
23 property QtObject session
25 property QtObject session
24 readonly property var childSessions: session ? session.childSessions : null
26 readonly property var childSessions: session ? session.childSessions : null
25 readonly property alias surface: _surfaceContainer.surface
27 readonly property alias surface: _surfaceContainer.surface
26 property alias interactive: _surfaceContainer.interactive
28 property alias interactive: _surfaceContainer.interactive
27 property alias surfaceOrientationAngle: _surfaceContainer.surfaceOrientationAngle
29 property alias surfaceOrientationAngle: _surfaceContainer.surfaceOrientationAngle
30+ property alias resizeSurface: _surfaceContainer.resizeSurface
28
31
29 readonly property alias surfaceContainer: _surfaceContainer
32 readonly property alias surfaceContainer: _surfaceContainer
30 SurfaceContainer {
33 SurfaceContainer {
qml/Stages/SurfaceContainer.qml+3−2
@@ -28,6 +28,7 @@ FocusScope {
28 property bool hadSurface: false
28 property bool hadSurface: false
29 property bool interactive
29 property bool interactive
30 property int surfaceOrientationAngle: 0
30 property int surfaceOrientationAngle: 0
31+ property bool resizeSurface: true
31
32
32 onSurfaceChanged: {
33 onSurfaceChanged: {
33 if (surface) {
34 if (surface) {
@@ -52,8 +53,8 @@ FocusScope {
52
53
53 consumesInput: true
54 consumesInput: true
54
55
55− surfaceWidth: width
56+ surfaceWidth: root.resizeSurface ? width : -1
56− surfaceHeight: height
57+ surfaceHeight: root.resizeSurface ? height : -1
57
58
58 anchors.fill: root
59 anchors.fill: root
59 enabled: root.interactive
60 enabled: root.interactive