on xenial help sign in
Fix regression introduced by the concierge change

borderSource was being assigned incorrectly, bubbled up the property with an alias to the parent item so that less code has to be changed Approved by: Andrea Cimitan

commit086eb86fceb2875ea9f2e63ea59409eb49a270e0 authorAlbert Astals Cid <albert.astals@canonical.com> dateTue 16 Jun 2015, 15:12 (11 years ago) parent3af82831c3d9db
5 files changed+17
plugins/Dash/CardCreator.js+2 tests/plugins/Dash/cardcreator/1.res+2 tests/plugins/Dash/cardcreator/3.res+2 tests/plugins/Dash/cardcreator/5.res+2 tests/qmltests/Dash/tst_GenericScopeView.qml+9
plugins/Dash/CardCreator.js+2
@@ -69,6 +69,7 @@ var kArtShapeHolderCode = 'Item { \n\
6969 property bool doShapeItem: components["art"]["conciergeMode"] !== true; \n\
7070 visible: image.status == Image.Ready; \n\
7171 readonly property alias image: artImage.image; \n\
72+ property alias borderSource: artShapeShape.borderSource; \n\
7273 ShaderEffectSource { \n\
7374 id: artShapeSource; \n\
7475 sourceItem: artImage; \n\
@@ -78,6 +79,7 @@ var kArtShapeHolderCode = 'Item { \n\
7879 hideSource: doShapeItem; \n\
7980 } \n\
8081 Shape { \n\
82+ id: artShapeShape; \n\
8183 image: artShapeSource; \n\
8284 anchors.fill: parent; \n\
8385 visible: doShapeItem; \n\
tests/plugins/Dash/cardcreator/1.res+2
@@ -33,6 +33,7 @@ Item {
3333 property bool doShapeItem: components["art"]["conciergeMode"] !== true;
3434 visible: image.status == Image.Ready;
3535 readonly property alias image: artImage.image;
36+ property alias borderSource: artShapeShape.borderSource;
3637 ShaderEffectSource {
3738 id: artShapeSource;
3839 sourceItem: artImage;
@@ -42,6 +43,7 @@ Item {
4243 hideSource: doShapeItem;
4344 }
4445 Shape {
46+ id: artShapeShape;
4547 image: artShapeSource;
4648 anchors.fill: parent;
4749 visible: doShapeItem;
tests/plugins/Dash/cardcreator/3.res+2
@@ -33,6 +33,7 @@ Item {
3333 property bool doShapeItem: components["art"]["conciergeMode"] !== true;
3434 visible: image.status == Image.Ready;
3535 readonly property alias image: artImage.image;
36+ property alias borderSource: artShapeShape.borderSource;
3637 ShaderEffectSource {
3738 id: artShapeSource;
3839 sourceItem: artImage;
@@ -42,6 +43,7 @@ Item {
4243 hideSource: doShapeItem;
4344 }
4445 Shape {
46+ id: artShapeShape;
4547 image: artShapeSource;
4648 anchors.fill: parent;
4749 visible: doShapeItem;
tests/plugins/Dash/cardcreator/5.res+2
@@ -33,6 +33,7 @@ Item {
3333 property bool doShapeItem: components["art"]["conciergeMode"] !== true;
3434 visible: image.status == Image.Ready;
3535 readonly property alias image: artImage.image;
36+ property alias borderSource: artShapeShape.borderSource;
3637 ShaderEffectSource {
3738 id: artShapeSource;
3839 sourceItem: artImage;
@@ -42,6 +43,7 @@ Item {
4243 hideSource: doShapeItem;
4344 }
4445 Shape {
46+ id: artShapeShape;
4547 image: artShapeSource;
4648 anchors.fill: parent;
4749 visible: doShapeItem;
tests/qmltests/Dash/tst_GenericScopeView.qml+9
@@ -652,6 +652,15 @@ Item {
652652 compare(touchdown.visible, false);
653653 closePreview();
654654 }
655+
656+ function test_carousel_borderSource() {
657+ var category = scrollToCategory("dashCategory1");
658+ var tile = findChild(category, "carouselDelegate0");
659+ tryCompareFunction(function() { return findChild(tile, "artShapeLoader") !== null; }, true);
660+ var artShapeLoader = findChild(tile, "artShapeLoader");
661+ var shape = findChildsByType(artShapeLoader, "UCUbuntuShape");
662+ compare(shape.borderSource, undefined);
663+ }
655664 }
656665 }
657666}