Merge lp:~mzanetti/unity8/spread-blur into lp:unity8

Proposed by Michael Zanetti
Status: Merged
Approved by: Lukáš Tinkl
Approved revision: 2672
Merged at revision: 2686
Proposed branch: lp:~mzanetti/unity8/spread-blur
Merge into: lp:unity8
Prerequisite: lp:~ci-train-bot/unity8/unity8-ubuntu-zesty-2022
Diff against target: 149 lines (+38/-42)
2 files modified
qml/Components/BlurLayer.qml (+10/-40)
qml/Stage/Stage.qml (+28/-2)
To merge this branch: bzr merge lp:~mzanetti/unity8/spread-blur
Reviewer Review Type Date Requested Status
Lukáš Tinkl (community) Approve
Unity8 CI Bot continuous-integration Needs Fixing
Review via email: mp+309335@code.launchpad.net

This proposal supersedes a proposal from 2016-10-26.

Commit message

Added blur and darkening to wallpaper while in spread

Description of the change

Prereq-archive: ppa:ci-train-ppa-service/2022

* Are there any related MPs required for this MP to build/function as expected? Please list.
see prereq
 * Did you perform an exploratory manual test run of your code change and any related functionality?
yes
 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
n/a
 * If you changed the UI, has there been a design review?
yes, visual changes given by Vesa

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Yeah code looks good, tested it and works fine

Will top approve after a meaningful CI run

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
lp:~mzanetti/unity8/spread-blur updated
2672. By Michael Zanetti

fix tutorial tests

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2672
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2442/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3205
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1832
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1832
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/1832
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3233
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/3088
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/3088/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3088
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3088/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3088
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3088/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/3088
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/3088/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3088
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3088/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3088
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3088/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/3088
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/3088/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3088
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3088/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3088
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3088/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2442/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Top-approving, unrelated Launcher failures

review: Approve
lp:~mzanetti/unity8/spread-blur updated
2673. By Michael Zanetti

improve performance on BlurLayer

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Components/BlurLayer.qml'
2--- qml/Components/BlurLayer.qml 2015-09-18 11:39:22 +0000
3+++ qml/Components/BlurLayer.qml 2016-11-09 13:03:30 +0000
4@@ -20,50 +20,20 @@
5 Item {
6 id: root
7
8- property alias source: shaderEffectSource.sourceItem
9- property alias saturation: desaturateEffect.saturationValue
10- property alias blurRadius: fastBlur.radius
11-
12- readonly property alias ready: shaderEffectSource.ready
13-
14- ShaderEffect {
15- id: desaturateEffect
16- anchors.fill: root
17-
18- property real saturationValue: 1
19-
20- property variant source: ShaderEffectSource {
21- id: shaderEffectSource
22- hideSource: root.visible
23- live: !root.visible
24- property bool ready: false;
25- onLiveChanged: {
26- if (!live) {
27- ready = false;
28- scheduleUpdate();
29- }
30- }
31- onScheduledUpdateCompleted: ready = true;
32- }
33-
34- fragmentShader: "
35- varying highp vec2 qt_TexCoord0;
36- uniform sampler2D source;
37- uniform lowp float saturationValue;
38- void main(void)
39- {
40- highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
41- highp vec4 scaledColor = sourceColor * vec4(0.3, 0.59, 0.11, 1.0);
42- lowp float luminance = scaledColor.r + scaledColor.g + scaledColor.b ;
43- gl_FragColor = mix(vec4(luminance, luminance, luminance, sourceColor.a), sourceColor, saturationValue);
44- }"
45- }
46+ property alias source: fastBlur.source
47+ property real brightness: 1
48+ property real blurRadius: 0
49
50 FastBlur {
51 id: fastBlur
52 anchors.fill: parent
53- source: desaturateEffect
54 visible: radius > 0
55- radius: 0
56+ radius: Math.max(root.blurRadius, 0)
57+ }
58+
59+ Rectangle {
60+ anchors.fill: parent
61+ color: "black"
62+ opacity: 1 - root.brightness
63 }
64 }
65
66=== modified file 'qml/Stage/Stage.qml'
67--- qml/Stage/Stage.qml 2016-10-24 11:34:20 +0000
68+++ qml/Stage/Stage.qml 2016-11-09 13:03:30 +0000
69@@ -54,7 +54,7 @@
70
71 // Used by the tutorial code
72 readonly property bool spreadShown: state == "spread"
73- readonly property real rightEdgeDragProgress: rightEdgeDragArea.progress // How far left the stage has been dragged
74+ readonly property real rightEdgeDragProgress: rightEdgeDragArea.dragging ? rightEdgeDragArea.progress : 0 // How far left the stage has been dragged
75
76 // used by the snap windows (edge maximize) feature
77 readonly property alias previewRectangle: fakeRectangle
78@@ -409,12 +409,22 @@
79 PropertyChanges { target: hoverMouseArea; enabled: true }
80 PropertyChanges { target: rightEdgeDragArea; enabled: false }
81 PropertyChanges { target: cancelSpreadMouseArea; enabled: true }
82+ PropertyChanges { target: blurLayer; visible: true; blurRadius: 32; brightness: .65; opacity: 1 }
83+ PropertyChanges { target: wallpaper; visible: false }
84 },
85 State {
86 name: "stagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "staged"
87+ PropertyChanges {
88+ target: blurLayer;
89+ visible: true;
90+ blurRadius: 32
91+ brightness: .65
92+ opacity: 1
93+ }
94 },
95 State {
96 name: "sideStagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "stagedWithSideStage"
97+ extend: "stagedRightEdge"
98 PropertyChanges {
99 target: sideStage
100 opacity: priv.sideStageDelegate.x === sideStage.x ? 1 : 0
101@@ -423,9 +433,17 @@
102 },
103 State {
104 name: "windowedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "windowed"
105+ PropertyChanges {
106+ target: blurLayer;
107+ visible: true
108+ blurRadius: 32
109+ brightness: .65
110+ opacity: MathUtils.linearAnimation(spreadItem.rightEdgeBreakPoint, 1, 0, 1, Math.max(rightEdgeDragArea.progress, edgeBarrier.progress))
111+ }
112 },
113 State {
114 name: "staged"; when: root.mode === "staged"
115+ PropertyChanges { target: wallpaper; visible: false }
116 },
117 State {
118 name: "stagedWithSideStage"; when: root.mode === "stagedWithSideStage"
119@@ -440,6 +458,7 @@
120 Transition {
121 from: "stagedRightEdge,sideStagedRightEdge,windowedRightEdge"; to: "spread"
122 PropertyAction { target: spreadItem; property: "highlightedIndex"; value: -1 }
123+ PropertyAnimation { target: blurLayer; properties: "brightness,blurRadius"; duration: priv.animationDuration }
124 },
125 Transition {
126 to: "spread"
127@@ -494,6 +513,13 @@
128 z: -2
129 }
130
131+ BlurLayer {
132+ id: blurLayer
133+ anchors.fill: parent
134+ source: wallpaper
135+ visible: false
136+ }
137+
138 Spread {
139 id: spreadItem
140 objectName: "spreadItem"
141@@ -1730,7 +1756,7 @@
142 property var gesturePoints: []
143 property bool cancelled: false
144
145- property real progress: dragging ? -touchPosition.x / root.width : 0
146+ property real progress: -touchPosition.x / root.width
147 onProgressChanged: {
148 if (dragging) {
149 draggedProgress = progress;

Subscribers

People subscribed via source and target branches