2023-05-22 21:58:37 +00:00
|
|
|
import QtCore
|
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
|
|
|
import QtQuick.Controls.Basic
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: myCheckBox
|
|
|
|
|
|
|
|
background: Rectangle {
|
|
|
|
color: "transparent"
|
|
|
|
}
|
|
|
|
|
|
|
|
indicator: Rectangle {
|
|
|
|
implicitWidth: 26
|
|
|
|
implicitHeight: 26
|
2023-05-23 17:56:31 +00:00
|
|
|
x: myCheckBox.leftPadding
|
2023-05-22 21:58:37 +00:00
|
|
|
y: parent.height / 2 - height / 2
|
2024-01-22 19:41:47 +00:00
|
|
|
border.color: theme.gray200
|
2024-01-26 22:13:39 +00:00
|
|
|
color: theme.containerBackground
|
2024-01-22 19:41:47 +00:00
|
|
|
radius: 3
|
2023-05-22 21:58:37 +00:00
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
width: 14
|
|
|
|
height: 14
|
|
|
|
x: 6
|
|
|
|
y: 6
|
2024-01-22 19:41:47 +00:00
|
|
|
radius: 2
|
|
|
|
color: theme.green600
|
2023-05-22 21:58:37 +00:00
|
|
|
visible: myCheckBox.checked
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
contentItem: Text {
|
|
|
|
text: myCheckBox.text
|
|
|
|
font: myCheckBox.font
|
|
|
|
opacity: enabled ? 1.0 : 0.3
|
|
|
|
color: theme.textColor
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
leftPadding: myCheckBox.indicator.width + myCheckBox.spacing
|
|
|
|
}
|
2024-01-22 19:41:47 +00:00
|
|
|
ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval
|
2023-05-22 21:58:37 +00:00
|
|
|
}
|