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
=== modified file 'qml/Components/BlurLayer.qml'
--- qml/Components/BlurLayer.qml 2015-09-18 11:39:22 +0000
+++ qml/Components/BlurLayer.qml 2016-11-09 13:03:30 +0000
@@ -20,50 +20,20 @@
20Item {20Item {
21 id: root21 id: root
2222
23 property alias source: shaderEffectSource.sourceItem23 property alias source: fastBlur.source
24 property alias saturation: desaturateEffect.saturationValue24 property real brightness: 1
25 property alias blurRadius: fastBlur.radius25 property real blurRadius: 0
26
27 readonly property alias ready: shaderEffectSource.ready
28
29 ShaderEffect {
30 id: desaturateEffect
31 anchors.fill: root
32
33 property real saturationValue: 1
34
35 property variant source: ShaderEffectSource {
36 id: shaderEffectSource
37 hideSource: root.visible
38 live: !root.visible
39 property bool ready: false;
40 onLiveChanged: {
41 if (!live) {
42 ready = false;
43 scheduleUpdate();
44 }
45 }
46 onScheduledUpdateCompleted: ready = true;
47 }
48
49 fragmentShader: "
50 varying highp vec2 qt_TexCoord0;
51 uniform sampler2D source;
52 uniform lowp float saturationValue;
53 void main(void)
54 {
55 highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
56 highp vec4 scaledColor = sourceColor * vec4(0.3, 0.59, 0.11, 1.0);
57 lowp float luminance = scaledColor.r + scaledColor.g + scaledColor.b ;
58 gl_FragColor = mix(vec4(luminance, luminance, luminance, sourceColor.a), sourceColor, saturationValue);
59 }"
60 }
6126
62 FastBlur {27 FastBlur {
63 id: fastBlur28 id: fastBlur
64 anchors.fill: parent29 anchors.fill: parent
65 source: desaturateEffect
66 visible: radius > 030 visible: radius > 0
67 radius: 031 radius: Math.max(root.blurRadius, 0)
32 }
33
34 Rectangle {
35 anchors.fill: parent
36 color: "black"
37 opacity: 1 - root.brightness
68 }38 }
69}39}
7040
=== modified file 'qml/Stage/Stage.qml'
--- qml/Stage/Stage.qml 2016-10-24 11:34:20 +0000
+++ qml/Stage/Stage.qml 2016-11-09 13:03:30 +0000
@@ -54,7 +54,7 @@
5454
55 // Used by the tutorial code55 // Used by the tutorial code
56 readonly property bool spreadShown: state == "spread"56 readonly property bool spreadShown: state == "spread"
57 readonly property real rightEdgeDragProgress: rightEdgeDragArea.progress // How far left the stage has been dragged57 readonly property real rightEdgeDragProgress: rightEdgeDragArea.dragging ? rightEdgeDragArea.progress : 0 // How far left the stage has been dragged
5858
59 // used by the snap windows (edge maximize) feature59 // used by the snap windows (edge maximize) feature
60 readonly property alias previewRectangle: fakeRectangle60 readonly property alias previewRectangle: fakeRectangle
@@ -409,12 +409,22 @@
409 PropertyChanges { target: hoverMouseArea; enabled: true }409 PropertyChanges { target: hoverMouseArea; enabled: true }
410 PropertyChanges { target: rightEdgeDragArea; enabled: false }410 PropertyChanges { target: rightEdgeDragArea; enabled: false }
411 PropertyChanges { target: cancelSpreadMouseArea; enabled: true }411 PropertyChanges { target: cancelSpreadMouseArea; enabled: true }
412 PropertyChanges { target: blurLayer; visible: true; blurRadius: 32; brightness: .65; opacity: 1 }
413 PropertyChanges { target: wallpaper; visible: false }
412 },414 },
413 State {415 State {
414 name: "stagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "staged"416 name: "stagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "staged"
417 PropertyChanges {
418 target: blurLayer;
419 visible: true;
420 blurRadius: 32
421 brightness: .65
422 opacity: 1
423 }
415 },424 },
416 State {425 State {
417 name: "sideStagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "stagedWithSideStage"426 name: "sideStagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "stagedWithSideStage"
427 extend: "stagedRightEdge"
418 PropertyChanges {428 PropertyChanges {
419 target: sideStage429 target: sideStage
420 opacity: priv.sideStageDelegate.x === sideStage.x ? 1 : 0430 opacity: priv.sideStageDelegate.x === sideStage.x ? 1 : 0
@@ -423,9 +433,17 @@
423 },433 },
424 State {434 State {
425 name: "windowedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "windowed"435 name: "windowedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "windowed"
436 PropertyChanges {
437 target: blurLayer;
438 visible: true
439 blurRadius: 32
440 brightness: .65
441 opacity: MathUtils.linearAnimation(spreadItem.rightEdgeBreakPoint, 1, 0, 1, Math.max(rightEdgeDragArea.progress, edgeBarrier.progress))
442 }
426 },443 },
427 State {444 State {
428 name: "staged"; when: root.mode === "staged"445 name: "staged"; when: root.mode === "staged"
446 PropertyChanges { target: wallpaper; visible: false }
429 },447 },
430 State {448 State {
431 name: "stagedWithSideStage"; when: root.mode === "stagedWithSideStage"449 name: "stagedWithSideStage"; when: root.mode === "stagedWithSideStage"
@@ -440,6 +458,7 @@
440 Transition {458 Transition {
441 from: "stagedRightEdge,sideStagedRightEdge,windowedRightEdge"; to: "spread"459 from: "stagedRightEdge,sideStagedRightEdge,windowedRightEdge"; to: "spread"
442 PropertyAction { target: spreadItem; property: "highlightedIndex"; value: -1 }460 PropertyAction { target: spreadItem; property: "highlightedIndex"; value: -1 }
461 PropertyAnimation { target: blurLayer; properties: "brightness,blurRadius"; duration: priv.animationDuration }
443 },462 },
444 Transition {463 Transition {
445 to: "spread"464 to: "spread"
@@ -494,6 +513,13 @@
494 z: -2513 z: -2
495 }514 }
496515
516 BlurLayer {
517 id: blurLayer
518 anchors.fill: parent
519 source: wallpaper
520 visible: false
521 }
522
497 Spread {523 Spread {
498 id: spreadItem524 id: spreadItem
499 objectName: "spreadItem"525 objectName: "spreadItem"
@@ -1730,7 +1756,7 @@
1730 property var gesturePoints: []1756 property var gesturePoints: []
1731 property bool cancelled: false1757 property bool cancelled: false
17321758
1733 property real progress: dragging ? -touchPosition.x / root.width : 01759 property real progress: -touchPosition.x / root.width
1734 onProgressChanged: {1760 onProgressChanged: {
1735 if (dragging) {1761 if (dragging) {
1736 draggedProgress = progress;1762 draggedProgress = progress;

Subscribers

People subscribed via source and target branches