on xenial help sign in
Some tweaks
e087db3Andrea Cimitan
qml/Components/LazyImage.qml+8−6
@@ -31,13 +31,13 @@ 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
34+ property alias sourceFillMode: shape.sourceFillMode
35 property alias asynchronous: image.asynchronous
35 property alias asynchronous: image.asynchronous
36 property alias cache: image.cache
36 property alias cache: image.cache
37− property alias horizontalAlignment: image.horizontalAlignment
37+ property alias sourceHorizontalAlignment: shape.sourceHorizontalAlignment
38− property alias verticalAlignment: image.verticalAlignment
38+ property alias sourceVerticalAlignment: shape.sourceVerticalAlignment
39 property alias sourceImage: image
39 property alias sourceImage: image
40− property alias borderSource: shape.borderSource
40+ property bool pressed: false
41
41
42 state: "default"
42 state: "default"
43
43
@@ -78,7 +78,7 @@ Item {
78 }
78 }
79 }
79 }
80
80
81− UbuntuShape {
81+ UbuntuShapeOverlay {
82 id: shape
82 id: shape
83 objectName: "shape"
83 objectName: "shape"
84 height: root.initialHeight
84 height: root.initialHeight
@@ -87,7 +87,9 @@ Item {
87
87
88 opacity: 0
88 opacity: 0
89 visible: opacity != 0
89 visible: opacity != 0
90+ overlayColor: Qt.rgba(0, 0, 0, root.pressed ? 0.1 : 0)
91+ overlayRect: Qt.rect(0.0, 0.0, 1.0, 1.0)
90− sourceFillMode: UbuntuShape.PreserveAspectFit
92+ sourceFillMode: UbuntuShape.PreserveAspectCrop
91 sourceHorizontalAlignment: UbuntuShape.AlignHCenter
93 sourceHorizontalAlignment: UbuntuShape.AlignHCenter
92 sourceVerticalAlignment: UbuntuShape.AlignVCenter
94 sourceVerticalAlignment: UbuntuShape.AlignVCenter
93 source: Image {
95 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