2022-05-13 13:12:05 +00:00
|
|
|
// Copyright (C) 2021 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2021-08-23 13:14:25 +00:00
|
|
|
import QtQml
|
|
|
|
import QtQuick
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
Item {
|
|
|
|
id: container
|
|
|
|
|
|
|
|
property alias horizontalMode: image.horizontalTileMode
|
|
|
|
property alias verticalMode: image.verticalTileMode
|
|
|
|
property alias source: image.source
|
|
|
|
|
|
|
|
property int minWidth
|
|
|
|
property int minHeight
|
|
|
|
property int maxWidth
|
|
|
|
property int maxHeight
|
|
|
|
property int margin
|
|
|
|
|
2023-03-30 07:12:28 +00:00
|
|
|
width: 240
|
|
|
|
height: 200
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
BorderImage {
|
2023-03-30 07:12:28 +00:00
|
|
|
id: image
|
|
|
|
|
|
|
|
anchors.centerIn: parent
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
SequentialAnimation on width {
|
|
|
|
loops: Animation.Infinite
|
|
|
|
NumberAnimation {
|
2023-03-30 07:12:28 +00:00
|
|
|
from: container.minWidth
|
|
|
|
to: container.maxWidth
|
|
|
|
duration: 2000
|
|
|
|
easing.type: Easing.InOutQuad
|
2011-04-27 10:05:43 +00:00
|
|
|
}
|
|
|
|
NumberAnimation {
|
2023-03-30 07:12:28 +00:00
|
|
|
from: container.maxWidth
|
|
|
|
to: container.minWidth
|
|
|
|
duration: 2000
|
|
|
|
easing.type: Easing.InOutQuad
|
2011-04-27 10:05:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SequentialAnimation on height {
|
|
|
|
loops: Animation.Infinite
|
|
|
|
NumberAnimation {
|
2023-03-30 07:12:28 +00:00
|
|
|
from: container.minHeight
|
|
|
|
to: container.maxHeight
|
|
|
|
duration: 2000
|
|
|
|
easing.type: Easing.InOutQuad
|
2011-04-27 10:05:43 +00:00
|
|
|
}
|
|
|
|
NumberAnimation {
|
2023-03-30 07:12:28 +00:00
|
|
|
from: container.maxHeight
|
|
|
|
to: container.minHeight
|
|
|
|
duration: 2000
|
|
|
|
easing.type: Easing.InOutQuad
|
2011-04-27 10:05:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
border.top: container.margin
|
|
|
|
border.left: container.margin
|
|
|
|
border.bottom: container.margin
|
|
|
|
border.right: container.margin
|
|
|
|
}
|
|
|
|
}
|