Files
shipheart-qt/Shipheart_formulaire_checkbox.qml
T

50 lines
1.4 KiB
QML

import QtQuick 2.12
import QtQuick.Controls 2.12
CheckBox {
id: formulaire_checkbox
property bool flag_num_only: false
property bool password_type: false
anchors {
right: parent.right
verticalCenter: parent.verticalCenter
}
width: parent.width - 50
height: parent.height - 10
tristate: false
checked: false
text: ""
font.pixelSize: 18
indicator: Rectangle {
anchors {
horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter
}
implicitWidth: 40
implicitHeight: 40
radius: 5
color: "transparent"
border.color: couleur_gris_tres_fonce //couleur_bleu_koriolan_clair
border.width: formulaire_checkbox.checked ? 0 : 1
Rectangle {
visible: formulaire_checkbox.checked
color: couleur_gris_tres_tres_pale //couleur_bleu_koriolan_clair
radius: 5
anchors.fill: parent
}
Text {
visible: formulaire_checkbox.checked
text: "\u2713" // U+2714 est la coche épaisse, U+2713 est la coche normale
color: couleur_bleu_koriolan
font.pixelSize: parent.height
anchors {
horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter
}
}
}
}