blob: 95d2bda9317c795c8f6c09afee1d3aef11ddda24 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick 2.15
import QtQuick.Templates 2.15 as T
T.ProgressBar {
id: root
implicitWidth: Math.max((background ? background.implicitWidth : 0) + leftInset + rightInset,
(contentItem ? contentItem.implicitWidth : 0) + leftPadding + rightPadding)
implicitHeight: Math.max((background ? background.implicitHeight : 0) + topInset + bottomInset,
(contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding)
leftInset: DefaultStyle.inset
topInset: DefaultStyle.inset
rightInset: DefaultStyle.inset
bottomInset: DefaultStyle.inset
leftPadding: DefaultStyle.padding
topPadding: DefaultStyle.padding
rightPadding: DefaultStyle.padding
bottomPadding: DefaultStyle.padding
background: Item {
implicitWidth: 200
implicitHeight: 16
BorderImage {
width: parent.width; height: 16
anchors.verticalCenter: parent.verticalCenter
border.left: 7
border.right: 7
border.top: 7
border.bottom: 7
source: "images/progressbar-background.png"
}
}
contentItem: Item {
implicitWidth: 200
implicitHeight: 16
BorderImage {
width: parent.width * root.position; height: 16
anchors.verticalCenter: parent.verticalCenter
border.left: 6
border.right: 6
border.top: 7
border.bottom: 7
source: "images/progressbar-progress.png"
}
}
}
|