aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Sebastian Kügler <sebas@kde.org>2015-12-08 01:10:56 +0100
committerGravatar Sebastian Kügler <sebas@kde.org>2015-12-08 01:10:56 +0100
commitfdd15d5d7ab6ff4b975cef142436b161912b6b05 (patch)
tree8d50131073bab2f3b25963171d91f3a77e31d1e5
parent1f41d933c0600a4fcea88a5cd66701cbeb4f9644 (diff)
downloadsubsurface-fdd15d5d7ab6ff4b975cef142436b161912b6b05.tar.gz
increase horizontal spacing at the edges
Spacing around pages is half a grid unit, as consistent with (some of the) other pages. For the dive list, it's slightly more complicated: We want the list items to reach the edges on both side as to increase the interactive area. We have to apply the spacing left and right inside the listitems. This patch does that. Another consistency fix with other pages is that we're now adding a header at the top of the dive list, which scrolles with the list view. Signed-off-by: Sebastian Kügler <sebas@kde.org>
-rw-r--r--qt-mobile/qml/DiveList.qml20
1 files changed, 16 insertions, 4 deletions
diff --git a/qt-mobile/qml/DiveList.qml b/qt-mobile/qml/DiveList.qml
index f57925396..3f0342ba8 100644
--- a/qt-mobile/qml/DiveList.qml
+++ b/qt-mobile/qml/DiveList.qml
@@ -45,7 +45,7 @@ MobileComponents.Page {
}
Item {
- width: parent.width - MobileComponents.Units.smallSpacing * 2
+ width: parent.width - MobileComponents.Units.gridUnit
height: childrenRect.height - MobileComponents.Units.smallSpacing
MobileComponents.Label {
@@ -56,6 +56,7 @@ MobileComponents.Page {
maximumLineCount: 1 // needed for elide to work at all
anchors {
left: parent.left
+ leftMargin: MobileComponents.Units.gridUnit / 2
top: parent.top
right: dateLabel.left
}
@@ -73,7 +74,9 @@ MobileComponents.Page {
Row {
anchors {
left: parent.left
+ leftMargin: MobileComponents.Units.gridUnit / 2
right: parent.right
+ rightMargin: MobileComponents.Units.gridUnit / 2
bottom: numberText.bottom
}
MobileComponents.Label {
@@ -104,6 +107,7 @@ MobileComponents.Page {
opacity: 0.6
anchors {
right: parent.right
+ rightMargin: MobileComponents.Units.gridUnit / 2
top: locationText.bottom
}
}
@@ -114,7 +118,7 @@ MobileComponents.Page {
Component {
id: tripHeading
Item {
- width: page.width - MobileComponents.Units.smallSpacing * 2
+ width: page.width - MobileComponents.Units.gridUnit
height: childrenRect.height + MobileComponents.Units.smallSpacing * 2
MobileComponents.Heading {
@@ -123,7 +127,7 @@ MobileComponents.Page {
anchors {
top: parent.top
left: parent.left
- leftMargin: MobileComponents.Units.smallSpacing
+ leftMargin: MobileComponents.Units.gridUnit / 2
right: parent.right
}
level: 2
@@ -133,7 +137,7 @@ MobileComponents.Page {
anchors {
top: sectionText.bottom
left: parent.left
- leftMargin: MobileComponents.Units.smallSpacing
+ leftMargin: MobileComponents.Units.gridUnit / 2
right: parent.right
}
color: subsurfaceTheme.accentColor
@@ -164,9 +168,17 @@ MobileComponents.Page {
section.property: "trip"
section.criteria: ViewSection.FullString
section.delegate: tripHeading
+ header: MobileComponents.Heading {
+ x: MobileComponents.Units.gridUnit / 2
+ y: x
+ text: "Dive Log"
+ opacity: 0.8 - startPage.opacity
+ visible: opacity > 0
+ }
}
}
StartPage {
+ id: startPage
anchors.fill: parent
opacity: (diveListView.count == 0) ? 1.0 : 0
visible: opacity > 0