on xenial help sign in
Merge
commit14092118dc541d2469a75b94affdbf959afff415 authorAndrea Cimitan <andrea.cimitan@gmail.com> dateMon 24 Aug 2015, 16:00 (11 years ago) parentdb15929f7a3c2e
10 files changed+17−18
plugins/Dash/CardCreator.js+1−1 qml/Components/LazyImage.qml+5−6 qml/Dash/Previews/PreviewImageGallery.qml+1−1 qml/Dash/Previews/PreviewZoomableImage.qml+1−1 tests/plugins/Dash/cardcreator/2.res+2−2 tests/plugins/Dash/cardcreator/6.res+2−2 tests/plugins/Dash/cardcreator/7.res+2−2 tests/plugins/Dash/cardcreator/8.res+1−1 tests/qmltests/Dash/tst_DashContent.qml+1−1 tests/qmltests/Dash/tst_PreviewListView.qml+1−1
plugins/Dash/CardCreator.js+1−1
@@ -30,7 +30,7 @@ var kBackgroundLoaderCode = 'Loader {\n\
3030 radius: "medium"; \n\
3131 backgroundColor: getColor(0) || "white"; \n\
3232 secondaryBackgroundColor: getColor(1) || backgroundColor; \n\
33− backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor; \n\
33+ backgroundMode: UbuntuShape.VerticalGradient; \n\
3434 anchors.fill: parent; \n\
3535 source: backgroundImage.source ? backgroundImage : null; \n\
3636 property real luminance: Style.luminance(backgroundColor); \n\
qml/Components/LazyImage.qml+5−6
@@ -31,13 +31,10 @@ Item {
3131 property real initialHeight: scaleTo == "height" || scaleTo == "fit" ? height : units.gu(10)
3232
3333 property alias sourceSize: image.sourceSize
34− property alias fillMode: image.fillMode
3534 property alias asynchronous: image.asynchronous
3635 property alias cache: image.cache
37− property alias horizontalAlignment: image.horizontalAlignment
38− property alias verticalAlignment: image.verticalAlignment
3936 property alias sourceImage: image
40− property alias borderSource: shape.borderSource
37+ property bool pressed: false
4138
4239 state: "default"
4340
@@ -78,7 +75,7 @@ Item {
7875 }
7976 }
8077
81− UbuntuShape {
78+ UbuntuShapeOverlay {
8279 id: shape
8380 objectName: "shape"
8481 height: root.initialHeight
@@ -87,7 +84,9 @@ Item {
8784
8885 opacity: 0
8986 visible: opacity != 0
90− sourceFillMode: UbuntuShape.PreserveAspectFit
87+ overlayColor: Qt.rgba(0, 0, 0, root.pressed ? 0.1 : 0)
88+ overlayRect: Qt.rect(0.0, 0.0, 1.0, 1.0)
89+ sourceFillMode: UbuntuShape.PreserveAspectCrop
9190 sourceHorizontalAlignment: UbuntuShape.AlignHCenter
9291 sourceVerticalAlignment: UbuntuShape.AlignVCenter
9392 source: Image {
qml/Dash/Previews/PreviewImageGallery.qml+1−1
@@ -62,7 +62,7 @@ PreviewWidget {
6262 source: modelData ? modelData : ""
6363 scaleTo: "height"
6464 initialWidth: units.gu(13)
65− borderSource: mouseArea.pressed ? "radius_pressed.sci" : "radius_idle.sci"
65+ pressed: mouseArea.pressed
6666
6767 MouseArea {
6868 id: mouseArea
qml/Dash/Previews/PreviewZoomableImage.qml+1−1
@@ -43,7 +43,7 @@ PreviewWidget {
4343 source: widgetData["source"]
4444 asynchronous: true
4545
46− borderSource: mouseArea.pressed ? "radius_pressed.sci" : "radius_idle.sci"
46+ pressed: mouseArea.pressed
4747
4848 MouseArea {
4949 id: mouseArea
tests/plugins/Dash/cardcreator/2.res+2−2
@@ -25,8 +25,8 @@ Loader {
2525 radius: "medium";
2626 backgroundColor: getColor(0) || "white";
2727 secondaryBackgroundColor: getColor(1) || backgroundColor;
28− backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor;
29− anchors.fill: parent;
28+ backgroundMode: UbuntuShape.VerticalGradient;
29+ anchors.fill: parent;
3030 source: backgroundImage.source ? backgroundImage : null;
3131 property real luminance: Style.luminance(backgroundColor);
3232 property Image backgroundImage: Image {
tests/plugins/Dash/cardcreator/6.res+2−2
@@ -25,8 +25,8 @@ Loader {
2525 radius: "medium";
2626 backgroundColor: getColor(0) || "white";
2727 secondaryBackgroundColor: getColor(1) || backgroundColor;
28− backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor;
29− anchors.fill: parent;
28+ backgroundMode: UbuntuShape.VerticalGradient;
29+ anchors.fill: parent;
3030 source: backgroundImage.source ? backgroundImage : null;
3131 property real luminance: Style.luminance(backgroundColor);
3232 property Image backgroundImage: Image {
tests/plugins/Dash/cardcreator/7.res+2−2
@@ -25,8 +25,8 @@ Loader {
2525 radius: "medium";
2626 backgroundColor: getColor(0) || "white";
2727 secondaryBackgroundColor: getColor(1) || backgroundColor;
28− backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor;
29− anchors.fill: parent;
28+ backgroundMode: UbuntuShape.VerticalGradient;
29+ anchors.fill: parent;
3030 source: backgroundImage.source ? backgroundImage : null;
3131 property real luminance: Style.luminance(backgroundColor);
3232 property Image backgroundImage: Image {
tests/plugins/Dash/cardcreator/8.res+1−1
@@ -25,7 +25,7 @@ Loader {
2525 radius: "medium";
2626 backgroundColor: getColor(0) || "white";
2727 secondaryBackgroundColor: getColor(1) || backgroundColor;
28− backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor;
28+ backgroundMode: UbuntuShape.VerticalGradient;
2929 anchors.fill: parent;
3030 source: backgroundImage.source ? backgroundImage : null;
3131 property real luminance: Style.luminance(backgroundColor);
tests/qmltests/Dash/tst_DashContent.qml+1−1
@@ -215,7 +215,7 @@ Item {
215215 verify(pageHeader, "Could not find the scope page header.");
216216 var innerHeader = findChild(pageHeader, "innerPageHeader");
217217 verify(innerHeader, "Could not find the scope page header.");
218− compare(innerHeader.title, scopesModel.getScope(data.index).name);
218+ compare(innerHeader.config.title, scopesModel.getScope(data.index).name);
219219 }
220220
221221 function test_is_active_data() {
tests/qmltests/Dash/tst_PreviewListView.qml+1−1
@@ -91,7 +91,7 @@ Rectangle {
9191 var header = findChild(listView, "innerPageHeader");
9292 verify(header, "Could not find the preview header");
9393
94− compare(header.title, "Mock Scope");
94+ compare(header.config.title, "Mock Scope");
9595 }
9696
9797 function test_header_style() {