diff options
Diffstat (limited to 'examples/declarative/border-image/content')
-rw-r--r-- | examples/declarative/border-image/content/MyBorderImage.qml | 5 | ||||
-rw-r--r-- | examples/declarative/border-image/content/ShadowRectangle.qml | 14 | ||||
-rw-r--r-- | examples/declarative/border-image/content/shadow.png | bin | 0 -> 588 bytes |
3 files changed, 17 insertions, 2 deletions
diff --git a/examples/declarative/border-image/content/MyBorderImage.qml b/examples/declarative/border-image/content/MyBorderImage.qml index f65f093..2573a14 100644 --- a/examples/declarative/border-image/content/MyBorderImage.qml +++ b/examples/declarative/border-image/content/MyBorderImage.qml @@ -1,6 +1,8 @@ import Qt 4.7 Item { + id: container + property alias horizontalMode: image.horizontalTileMode property alias verticalMode: image.verticalTileMode property alias source: image.source @@ -11,11 +13,10 @@ Item { property int maxHeight property int margin - id: container width: 240; height: 240 BorderImage { - id: image; x: container.width / 2 - width / 2; y: container.height / 2 - height / 2 + id: image; anchors.centerIn: parent SequentialAnimation on width { loops: Animation.Infinite diff --git a/examples/declarative/border-image/content/ShadowRectangle.qml b/examples/declarative/border-image/content/ShadowRectangle.qml new file mode 100644 index 0000000..629478b --- /dev/null +++ b/examples/declarative/border-image/content/ShadowRectangle.qml @@ -0,0 +1,14 @@ +import Qt 4.7 + +Item { + property alias color : rectangle.color + + BorderImage { + anchors.fill: rectangle + anchors { leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8 } + border { left: 10; top: 10; right: 10; bottom: 10 } + source: "shadow.png"; smooth: true + } + + Rectangle { id: rectangle; anchors.fill: parent } +} diff --git a/examples/declarative/border-image/content/shadow.png b/examples/declarative/border-image/content/shadow.png Binary files differnew file mode 100644 index 0000000..431af85 --- /dev/null +++ b/examples/declarative/border-image/content/shadow.png |