-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathGCard.qml
40 lines (39 loc) · 948 Bytes
/
GCard.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import QtQuick
import QtQml
import QtQuick.Controls
import QtQuick.Layouts
AbstractButton {
id: self
property string description
padding: 24
background: Rectangle {
border.width: self.activeFocus ? 1 : 0
border.color: constants.c600
radius: 8
color: self.hovered ? constants.c500 : constants.c700
Behavior on color {
ColorAnimation {
duration: 300
}
}
}
contentItem: ColumnLayout {
spacing: 12
RowLayout {
spacing: 12
Label {
Layout.fillWidth: true
text: self.text
font.bold: true
font.pixelSize: 20
}
}
Label {
Layout.fillWidth: true
Layout.fillHeight: true
text: self.description
font.pixelSize: 12
wrapMode: Text.WordWrap
}
}
}