diff options
Diffstat (limited to 'examples/declarative/border-image/MyBorderImage.qml')
-rw-r--r-- | examples/declarative/border-image/MyBorderImage.qml | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/declarative/border-image/MyBorderImage.qml b/examples/declarative/border-image/MyBorderImage.qml index f9531df..395b648 100644 --- a/examples/declarative/border-image/MyBorderImage.qml +++ b/examples/declarative/border-image/MyBorderImage.qml @@ -1,9 +1,9 @@ import Qt 4.6 Item { - property var horizontalMode : "Stretch" - property var verticalMode : "Stretch" - property string source + property var horizontalMode : BorderImage.Stretch + property var verticalMode : BorderImage.Stretch + property alias source: MyImage.source property int minWidth property int minHeight property int maxWidth @@ -13,19 +13,20 @@ Item { id: Container width: 240; height: 240 BorderImage { - x: Container.width / 2 - width / 2 - y: Container.height / 2 - height / 2 + id: MyImage; x: Container.width / 2 - width / 2; y: Container.height / 2 - height / 2 + width: SequentialAnimation { running: true; repeat: true NumberAnimation { from: Container.minWidth; to: Container.maxWidth; duration: 2000; easing: "easeInOutQuad"} NumberAnimation { from: Container.maxWidth; to: Container.minWidth; duration: 2000; easing: "easeInOutQuad" } } + height: SequentialAnimation { running: true; repeat: true NumberAnimation { from: Container.minHeight; to: Container.maxHeight; duration: 2000; easing: "easeInOutQuad"} NumberAnimation { from: Container.maxHeight; to: Container.minHeight; duration: 2000; easing: "easeInOutQuad" } } - source: Container.source + horizontalTileMode: Container.horizontalMode verticalTileMode: Container.verticalMode border.top: Container.margin |