aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-02 10:40:54 -0500
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-02 12:46:59 -0500
commitbb43a3fa32d887c256bfd65a0c8336cc36c1a573 (patch)
tree3b732ae3419b21a815c8c7315685d4b5bd4f4773 /qt-mobile
parent0a0d7b48e9cc84c1d1bf68846a13cebf3e98aafd (diff)
downloadsubsurface-bb43a3fa32d887c256bfd65a0c8336cc36c1a573.tar.gz
whitespace cleanup for previous commit
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile')
-rw-r--r--qt-mobile/qml/DiveList.qml172
1 files changed, 86 insertions, 86 deletions
diff --git a/qt-mobile/qml/DiveList.qml b/qt-mobile/qml/DiveList.qml
index c3a92a93d..de511f1d9 100644
--- a/qt-mobile/qml/DiveList.qml
+++ b/qt-mobile/qml/DiveList.qml
@@ -57,112 +57,112 @@ Kirigami.ScrollablePage {
NumberAnimation { property: "opacity"; from: 0; to: 1.0; duration: 400 }
NumberAnimation { property: "scale"; from: 0; to: 1.0; duration: 400 }
}
- Item {
- id: diveListEntry
- width: parent.width - Kirigami.Units.gridUnit
- height: childrenRect.height - Kirigami.Units.smallSpacing
+ Item {
+ id: diveListEntry
+ width: parent.width - Kirigami.Units.gridUnit
+ height: childrenRect.height - Kirigami.Units.smallSpacing
- Kirigami.Label {
- id: locationText
- text: dive.location
- font.weight: Font.Light
- elide: Text.ElideRight
- maximumLineCount: 1 // needed for elide to work at all
- color: textColor
- anchors {
- left: parent.left
- leftMargin: horizontalPadding
- top: parent.top
- right: dateLabel.left
- }
- }
- Kirigami.Label {
- id: dateLabel
- text: dive.date + " " + dive.time
- font.pointSize: subsurfaceTheme.smallPointSize
- color: textColor
- anchors {
- right: parent.right
- top: parent.top
- }
- }
- Row {
- anchors {
- left: parent.left
- leftMargin: horizontalPadding
- right: parent.right
- rightMargin: horizontalPadding
- topMargin: - Kirigami.Units.smallSpacing * 2
- bottom: numberText.bottom
- }
Kirigami.Label {
- text: 'Depth: '
- font.pointSize: subsurfaceTheme.smallPointSize
+ id: locationText
+ text: dive.location
+ font.weight: Font.Light
+ elide: Text.ElideRight
+ maximumLineCount: 1 // needed for elide to work at all
color: textColor
+ anchors {
+ left: parent.left
+ leftMargin: horizontalPadding
+ top: parent.top
+ right: dateLabel.left
+ }
}
Kirigami.Label {
- text: dive.depth
- width: Math.max(Kirigami.Units.gridUnit * 3, paintedWidth) // helps vertical alignment throughout listview
+ id: dateLabel
+ text: dive.date + " " + dive.time
font.pointSize: subsurfaceTheme.smallPointSize
color: textColor
+ anchors {
+ right: parent.right
+ top: parent.top
+ }
}
- Kirigami.Label {
- text: 'Duration: '
- font.pointSize: subsurfaceTheme.smallPointSize
- color: textColor
+ Row {
+ anchors {
+ left: parent.left
+ leftMargin: horizontalPadding
+ right: parent.right
+ rightMargin: horizontalPadding
+ topMargin: - Kirigami.Units.smallSpacing * 2
+ bottom: numberText.bottom
+ }
+ Kirigami.Label {
+ text: 'Depth: '
+ font.pointSize: subsurfaceTheme.smallPointSize
+ color: textColor
+ }
+ Kirigami.Label {
+ text: dive.depth
+ width: Math.max(Kirigami.Units.gridUnit * 3, paintedWidth) // helps vertical alignment throughout listview
+ font.pointSize: subsurfaceTheme.smallPointSize
+ color: textColor
+ }
+ Kirigami.Label {
+ text: 'Duration: '
+ font.pointSize: subsurfaceTheme.smallPointSize
+ color: textColor
+ }
+ Kirigami.Label {
+ text: dive.duration
+ font.pointSize: subsurfaceTheme.smallPointSize
+ color: textColor
+ }
}
Kirigami.Label {
- text: dive.duration
+ id: numberText
+ text: "#" + dive.number
font.pointSize: subsurfaceTheme.smallPointSize
color: textColor
+ anchors {
+ right: parent.right
+ top: locationText.bottom
+ topMargin: - Kirigami.Units.smallSpacing * 2
+ }
}
}
- Kirigami.Label {
- id: numberText
- text: "#" + dive.number
- font.pointSize: subsurfaceTheme.smallPointSize
- color: textColor
- anchors {
- right: parent.right
- top: locationText.bottom
- topMargin: - Kirigami.Units.smallSpacing * 2
+ Rectangle {
+ visible: deleteButtonVisible
+ height: diveListEntry.height - Kirigami.Units.smallSpacing
+ width: height - 3 * Kirigami.Units.smallSpacing
+ color: "#FF3030"
+ antialiasing: true
+ radius: Kirigami.Units.smallSpacing
+ Kirigami.Icon {
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ verticalCenter: parent.verticalCenter
+ }
+ source: "trash-empty"
}
- }
- }
- Rectangle {
- visible: deleteButtonVisible
- height: diveListEntry.height - Kirigami.Units.smallSpacing
- width: height - 3 * Kirigami.Units.smallSpacing
- color: "#FF3030"
- antialiasing: true
- radius: Kirigami.Units.smallSpacing
- Kirigami.Icon {
- anchors {
- horizontalCenter: parent.horizontalCenter
- verticalCenter: parent.verticalCenter
+ MouseArea {
+ anchors.fill: parent
+ enabled: parent.visible
+ onClicked: {
+ parent.visible = false
+ timer.stop()
+ manager.deleteDive(dive.id)
+ }
}
- source: "trash-empty"
}
- MouseArea {
- anchors.fill: parent
- enabled: parent.visible
- onClicked: {
- parent.visible = false
- timer.stop()
- manager.deleteDive(dive.id)
+ Item {
+ Timer {
+ id: timer
+ interval: 4000
+ onTriggered: {
+ deleteButtonVisible = false
+ }
}
}
}
- Item {
- Timer {
- id: timer
- interval: 4000
- onTriggered: {
- deleteButtonVisible = false
- }
- }
- }
- }
}
}