56 lines
1.5 KiB
QML
56 lines
1.5 KiB
QML
import QtQuick 2.12
|
|
|
|
|
|
Rectangle {
|
|
id: formulaire_bouton
|
|
|
|
property bool actif: false
|
|
property bool affichage_fleche: false // Indique si l'on affiche les flèches haut/bas, ou pas.
|
|
property bool fleche_haut: false // Utilisé uniquement si 'affichage_fleche' est TRUE, indique si la flèche à utiliser est vers le haut (true) ou vers le bas (false)
|
|
property string titre: ""
|
|
property color couleur_titre: couleur_blanc_casse
|
|
property bool gras_titre: false
|
|
|
|
color: actif ? shipheart_couleur_fond_bouton_actif : shipheart_couleur_fond_bouton
|
|
radius: shipheart_rayon_bouton
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
height: parent.height - 10 // Nb : la Width est donnée au moment de l'appel de Combobox
|
|
|
|
|
|
Image {
|
|
source: "/images/up.png"
|
|
sourceSize.height: 15
|
|
anchors {
|
|
verticalCenter: parent.verticalCenter
|
|
right: parent.right
|
|
rightMargin: 20
|
|
}
|
|
visible: affichage_fleche && fleche_haut
|
|
}
|
|
|
|
Image {
|
|
source: "/images/down.png"
|
|
sourceSize.height: 15
|
|
anchors {
|
|
verticalCenter: parent.verticalCenter
|
|
right: parent.right
|
|
rightMargin: 20
|
|
}
|
|
visible: affichage_fleche && !fleche_haut
|
|
}
|
|
|
|
Text {
|
|
anchors {
|
|
verticalCenter: parent.verticalCenter
|
|
horizontalCenter: parent.horizontalCenter
|
|
}
|
|
text: titre
|
|
font.pixelSize: 18
|
|
font.bold: gras_titre
|
|
color: couleur_titre
|
|
}
|
|
|
|
|
|
}
|