on xenial help sign in
Some tweaks
commite087db3cc4a7fc4c46223d712e0b1704727707df authorAndrea Cimitan <andrea.cimitan@gmail.com> dateFri 21 Aug 2015, 15:28 (11 years ago) parent4603daa
3 files changed+10−8
qml/Components/LazyImage.qml+8−6 qml/Dash/Previews/PreviewImageGallery.qml+1−1 qml/Dash/Previews/PreviewZoomableImage.qml+1−1
qml/Components/LazyImage.qml+8−6
@@ -31,13 +31,13 @@ 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
34+ property alias sourceFillMode: shape.sourceFillMode
3535 property alias asynchronous: image.asynchronous
3636 property alias cache: image.cache
37− property alias horizontalAlignment: image.horizontalAlignment
38− property alias verticalAlignment: image.verticalAlignment
37+ property alias sourceHorizontalAlignment: shape.sourceHorizontalAlignment
38+ property alias sourceVerticalAlignment: shape.sourceVerticalAlignment
3939 property alias sourceImage: image
40− property alias borderSource: shape.borderSource
40+ property bool pressed: false
4141
4242 state: "default"
4343
@@ -78,7 +78,7 @@ Item {
7878 }
7979 }
8080
81− UbuntuShape {
81+ UbuntuShapeOverlay {
8282 id: shape
8383 objectName: "shape"
8484 height: root.initialHeight
@@ -87,7 +87,9 @@ Item {
8787
8888 opacity: 0
8989 visible: opacity != 0
90− sourceFillMode: UbuntuShape.PreserveAspectFit
90+ overlayColor: Qt.rgba(0, 0, 0, root.pressed ? 0.1 : 0)
91+ overlayRect: Qt.rect(0.0, 0.0, 1.0, 1.0)
92+ sourceFillMode: UbuntuShape.PreserveAspectCrop
9193 sourceHorizontalAlignment: UbuntuShape.AlignHCenter
9294 sourceVerticalAlignment: UbuntuShape.AlignVCenter
9395 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