blob: cfec35929d8c0a0695246cdd0c4c7366b04ba46f (
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
|
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
Item {
property alias text: propText.text
property alias checked: checkBox.checked
width: rowLayout.width
height: rowLayout.height
RowLayout {
id: rowLayout
CheckBox {
id: checkBox
indicator: Rectangle {
anchors.centerIn: parent
implicitWidth: 20
implicitHeight: 20
radius: 5
color: checkBox.pressed ? "#d0d0d0" : "#606060"
border.color: "#848895"
Rectangle {
anchors.centerIn: parent
implicitWidth: 12
implicitHeight: 12
radius: 4
color: "#ffffff"
border.color: "#848895"
visible: checkBox.checked
}
}
}
Label {
id: propText
color: "#f0f0f0"
font.pointSize: 10
Layout.minimumWidth: 150
Layout.maximumWidth: 150
opacity: checkBox.checked ? 1.0 : 0.5
}
}
}
|