on xenial help sign in
Merge
1409211Andrea Cimitan
plugins/Dash/CardCreator.js+1−1
@@ -30,7 +30,7 @@ var kBackgroundLoaderCode = 'Loader {\n\
30 radius: "medium"; \n\
30 radius: "medium"; \n\
31 backgroundColor: getColor(0) || "white"; \n\
31 backgroundColor: getColor(0) || "white"; \n\
32 secondaryBackgroundColor: getColor(1) || backgroundColor; \n\
32 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\
34 anchors.fill: parent; \n\
34 anchors.fill: parent; \n\
35 source: backgroundImage.source ? backgroundImage : null; \n\
35 source: backgroundImage.source ? backgroundImage : null; \n\
36 property real luminance: Style.luminance(backgroundColor); \n\
36 property real luminance: Style.luminance(backgroundColor); \n\
qml/Components/LazyImage.qml+5−6
@@ -31,13 +31,10 @@ Item {
31 property real initialHeight: scaleTo == "height" || scaleTo == "fit" ? height : units.gu(10)
31 property real initialHeight: scaleTo == "height" || scaleTo == "fit" ? height : units.gu(10)
32
32
33 property alias sourceSize: image.sourceSize
33 property alias sourceSize: image.sourceSize
34− property alias fillMode: image.fillMode
35 property alias asynchronous: image.asynchronous
34 property alias asynchronous: image.asynchronous
36 property alias cache: image.cache
35 property alias cache: image.cache
37− property alias horizontalAlignment: image.horizontalAlignment
38− property alias verticalAlignment: image.verticalAlignment
39 property alias sourceImage: image
36 property alias sourceImage: image
40− property alias borderSource: shape.borderSource
37+ property bool pressed: false
41
38
42 state: "default"
39 state: "default"
43
40
@@ -78,7 +75,7 @@ Item {
78 }
75 }
79 }
76 }
80
77
81− UbuntuShape {
78+ UbuntuShapeOverlay {
82 id: shape
79 id: shape
83 objectName: "shape"
80 objectName: "shape"
84 height: root.initialHeight
81 height: root.initialHeight
@@ -87,7 +84,9 @@ Item {
87
84
88 opacity: 0
85 opacity: 0
89 visible: opacity != 0
86 visible: opacity != 0
87+ overlayColor: Qt.rgba(0, 0, 0, root.pressed ? 0.1 : 0)
88+ overlayRect: Qt.rect(0.0, 0.0, 1.0, 1.0)
90− sourceFillMode: UbuntuShape.PreserveAspectFit
89+ sourceFillMode: UbuntuShape.PreserveAspectCrop
91 sourceHorizontalAlignment: UbuntuShape.AlignHCenter
90 sourceHorizontalAlignment: UbuntuShape.AlignHCenter
92 sourceVerticalAlignment: UbuntuShape.AlignVCenter
91 sourceVerticalAlignment: UbuntuShape.AlignVCenter
93 source: Image {
92 source: Image {
qml/Dash/Previews/PreviewImageGallery.qml+1−1
@@ -62,7 +62,7 @@ PreviewWidget {
62 source: modelData ? modelData : ""
62 source: modelData ? modelData : ""
63 scaleTo: "height"
63 scaleTo: "height"
64 initialWidth: units.gu(13)
64 initialWidth: units.gu(13)
65− borderSource: mouseArea.pressed ? "radius_pressed.sci" : "radius_idle.sci"
65+ pressed: mouseArea.pressed
66
66
67 MouseArea {
67 MouseArea {
68 id: mouseArea
68 id: mouseArea
qml/Dash/Previews/PreviewZoomableImage.qml+1−1
@@ -43,7 +43,7 @@ PreviewWidget {
43 source: widgetData["source"]
43 source: widgetData["source"]
44 asynchronous: true
44 asynchronous: true
45
45
46− borderSource: mouseArea.pressed ? "radius_pressed.sci" : "radius_idle.sci"
46+ pressed: mouseArea.pressed
47
47
48 MouseArea {
48 MouseArea {
49 id: mouseArea
49 id: mouseArea
tests/plugins/Dash/cardcreator/2.res+2−2
@@ -25,8 +25,8 @@ Loader {
25 radius: "medium";
25 radius: "medium";
26 backgroundColor: getColor(0) || "white";
26 backgroundColor: getColor(0) || "white";
27 secondaryBackgroundColor: getColor(1) || backgroundColor;
27 secondaryBackgroundColor: getColor(1) || backgroundColor;
28− backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor;
28+ backgroundMode: UbuntuShape.VerticalGradient;
29− anchors.fill: parent;
29+ anchors.fill: parent;
30 source: backgroundImage.source ? backgroundImage : null;
30 source: backgroundImage.source ? backgroundImage : null;
31 property real luminance: Style.luminance(backgroundColor);
31 property real luminance: Style.luminance(backgroundColor);
32 property Image backgroundImage: Image {
32 property Image backgroundImage: Image {
tests/plugins/Dash/cardcreator/6.res+2−2
@@ -25,8 +25,8 @@ Loader {
25 radius: "medium";
25 radius: "medium";
26 backgroundColor: getColor(0) || "white";
26 backgroundColor: getColor(0) || "white";
27 secondaryBackgroundColor: getColor(1) || backgroundColor;
27 secondaryBackgroundColor: getColor(1) || backgroundColor;
28− backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor;
28+ backgroundMode: UbuntuShape.VerticalGradient;
29− anchors.fill: parent;
29+ anchors.fill: parent;
30 source: backgroundImage.source ? backgroundImage : null;
30 source: backgroundImage.source ? backgroundImage : null;
31 property real luminance: Style.luminance(backgroundColor);
31 property real luminance: Style.luminance(backgroundColor);
32 property Image backgroundImage: Image {
32 property Image backgroundImage: Image {
tests/plugins/Dash/cardcreator/7.res+2−2
@@ -25,8 +25,8 @@ Loader {
25 radius: "medium";
25 radius: "medium";
26 backgroundColor: getColor(0) || "white";
26 backgroundColor: getColor(0) || "white";
27 secondaryBackgroundColor: getColor(1) || backgroundColor;
27 secondaryBackgroundColor: getColor(1) || backgroundColor;
28− backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor;
28+ backgroundMode: UbuntuShape.VerticalGradient;
29− anchors.fill: parent;
29+ anchors.fill: parent;
30 source: backgroundImage.source ? backgroundImage : null;
30 source: backgroundImage.source ? backgroundImage : null;
31 property real luminance: Style.luminance(backgroundColor);
31 property real luminance: Style.luminance(backgroundColor);
32 property Image backgroundImage: Image {
32 property Image backgroundImage: Image {
tests/plugins/Dash/cardcreator/8.res+1−1
@@ -25,7 +25,7 @@ Loader {
25 radius: "medium";
25 radius: "medium";
26 backgroundColor: getColor(0) || "white";
26 backgroundColor: getColor(0) || "white";
27 secondaryBackgroundColor: getColor(1) || backgroundColor;
27 secondaryBackgroundColor: getColor(1) || backgroundColor;
28− backgroundMode: cardData && typeof cardData["background"] === "object" && cardData["background"]["type"] === "gradient" ? UbuntuShape.VerticalGradient : UbuntuShape.SolidColor;
28+ backgroundMode: UbuntuShape.VerticalGradient;
29 anchors.fill: parent;
29 anchors.fill: parent;
30 source: backgroundImage.source ? backgroundImage : null;
30 source: backgroundImage.source ? backgroundImage : null;
31 property real luminance: Style.luminance(backgroundColor);
31 property real luminance: Style.luminance(backgroundColor);
tests/qmltests/Dash/tst_DashContent.qml+1−1
@@ -215,7 +215,7 @@ Item {
215 verify(pageHeader, "Could not find the scope page header.");
215 verify(pageHeader, "Could not find the scope page header.");
216 var innerHeader = findChild(pageHeader, "innerPageHeader");
216 var innerHeader = findChild(pageHeader, "innerPageHeader");
217 verify(innerHeader, "Could not find the scope page header.");
217 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);
219 }
219 }
220
220
221 function test_is_active_data() {
221 function test_is_active_data() {
tests/qmltests/Dash/tst_PreviewListView.qml+1−1
@@ -91,7 +91,7 @@ Rectangle {
91 var header = findChild(listView, "innerPageHeader");
91 var header = findChild(listView, "innerPageHeader");
92 verify(header, "Could not find the preview header");
92 verify(header, "Could not find the preview header");
93
93
94− compare(header.title, "Mock Scope");
94+ compare(header.config.title, "Mock Scope");
95 }
95 }
96
96
97 function test_header_style() {
97 function test_header_style() {