Add all view

This commit is contained in:
stilobique committed 2026-11-08 10:26:27 +01:00
1 parent 186cff1d73
commit 49d8524597
18 files changed
+1007 -98

No files matched your search

+46
View File
@@ -0,0 +1,46 @@
import QtQuick 2.5
import "."
// Bouton navigable à la télécommande : surbrillance blanche quand il a le focus.
Rectangle {
id: root
property alias text: label.text
property bool primary: false
signal clicked()
implicitWidth: Math.max(160, label.implicitWidth + Theme.spacingL * 2)
implicitHeight: Theme.controlHeight
radius: Theme.radius
opacity: enabled ? 1 : 0.5
color: activeFocus ? Theme.focusBackground : (primary ? Theme.accent : Theme.surface)
scale: activeFocus ? 1.05 : 1
Behavior on scale { NumberAnimation { duration: Theme.animFast } }
Behavior on color { ColorAnimation { duration: Theme.animFast } }
Text {
id: label
anchors.centerIn: parent
color: root.activeFocus ? Theme.textOnFocus : Theme.text
font.pixelSize: Theme.fontBody
font.bold: root.activeFocus
}
Keys.onPressed: {
if (Remote.isAccept(event.key)) {
event.accepted = true;
root.clicked();
}
}
// Souris : pratique pour tester hors de la box.
MouseArea {
anchors.fill: parent
enabled: root.enabled
onClicked: {
root.forceActiveFocus();
root.clicked();
}
}
}