Refactoring: move all apps inside a sub folder
This commit is contained in:
1 parent
33e4fe0c4e
commit
b1ca2a7cff
41 files changed
+54
-45
No files matched your search
@@ -0,0 +1,71 @@
|
||||
import QtQuick 2.5
|
||||
import "../Shared"
|
||||
|
||||
// Ligne de la liste des serveurs.
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
property string name: ""
|
||||
property string address: ""
|
||||
property bool highlighted: false
|
||||
signal clicked()
|
||||
|
||||
height: 72
|
||||
radius: Theme.radius
|
||||
color: highlighted ? Theme.focusBackground : Theme.surface
|
||||
|
||||
Behavior on color { ColorAnimation { duration: Theme.animFast } }
|
||||
|
||||
Rectangle {
|
||||
id: icon
|
||||
anchors {
|
||||
left: parent.left
|
||||
leftMargin: Theme.spacingM
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
width: 40
|
||||
height: 40
|
||||
radius: width / 2
|
||||
color: Theme.avatarColor(root.name)
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: root.name.charAt(0).toUpperCase()
|
||||
color: Theme.text
|
||||
font.pixelSize: Theme.fontBody
|
||||
font.bold: true
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
anchors {
|
||||
left: icon.right
|
||||
leftMargin: Theme.spacingM
|
||||
right: parent.right
|
||||
rightMargin: Theme.spacingM
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
width: parent.width
|
||||
text: root.name
|
||||
color: root.highlighted ? Theme.textOnFocus : Theme.text
|
||||
font.pixelSize: Theme.fontBody
|
||||
font.bold: true
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Text {
|
||||
width: parent.width
|
||||
text: root.address
|
||||
color: root.highlighted ? Theme.textOnFocusMuted : Theme.textMuted
|
||||
font.pixelSize: Theme.fontSmall
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: root.clicked()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user