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

+58
View File
@@ -0,0 +1,58 @@
import QtQuick 2.5
import "."
// Carte utilisateur (avatar rond + nom). `addCard` affiche la carte « Ajouter un compte ».
Item {
id: root
property string name: ""
property bool addCard: false
property bool highlighted: false
signal clicked()
width: 140
height: 200
Rectangle {
id: avatar
anchors.horizontalCenter: parent.horizontalCenter
y: Theme.spacingS
width: 120
height: 120
radius: width / 2
color: root.addCard ? Theme.surface : Theme.avatarColor(root.name)
border.width: root.highlighted ? 4 : 0
border.color: Theme.focusBackground
scale: root.highlighted ? 1.1 : 1
Behavior on scale { NumberAnimation { duration: Theme.animFast } }
Text {
anchors.centerIn: parent
text: root.addCard ? "+" : root.name.charAt(0).toUpperCase()
color: Theme.text
font.pixelSize: 48
font.bold: true
}
}
Text {
anchors {
top: avatar.bottom
topMargin: Theme.spacingL
left: parent.left
right: parent.right
}
text: root.name
horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight
color: root.highlighted ? Theme.text : Theme.textMuted
font.pixelSize: Theme.fontBody
font.bold: root.highlighted
}
MouseArea {
anchors.fill: parent
onClicked: root.clicked()
}
}