0.2.0: card Memoria toccabile con dettaglio RAM per servizio/container
This commit is contained in:
1 parent
99aba8fa03
commit
714c4d5189
8 files changed
+237
-10
No files matched your search
@@ -12,6 +12,10 @@ Rectangle {
|
||||
property string detail
|
||||
property real progress: -1
|
||||
property int level: 0
|
||||
// Una card toccabile mostra il chevron e porta a una pagina di dettaglio.
|
||||
property bool interactive: false
|
||||
|
||||
signal clicked()
|
||||
|
||||
function levelColor() {
|
||||
if (level === 2) return "#e53935"
|
||||
@@ -38,7 +42,7 @@ Rectangle {
|
||||
text: card.title
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.secondaryColor
|
||||
width: parent.width * 0.55
|
||||
width: parent.width * (card.interactive ? 0.50 : 0.55)
|
||||
truncationMode: TruncationMode.Fade
|
||||
}
|
||||
|
||||
@@ -47,9 +51,18 @@ Rectangle {
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: card.level === 0 ? Theme.primaryColor : card.levelColor()
|
||||
horizontalAlignment: Text.AlignRight
|
||||
width: parent.width * 0.45
|
||||
width: parent.width * (card.interactive ? 0.40 : 0.45)
|
||||
truncationMode: TruncationMode.Fade
|
||||
}
|
||||
|
||||
Label {
|
||||
visible: card.interactive
|
||||
text: "›"
|
||||
width: parent.width * 0.10
|
||||
horizontalAlignment: Text.AlignRight
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.secondaryColor
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
@@ -76,4 +89,10 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
enabled: card.interactive
|
||||
onClicked: card.clicked()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user