From fdd15d5d7ab6ff4b975cef142436b161912b6b05 Mon Sep 17 00:00:00 2001 From: Sebastian Kügler Date: Tue, 8 Dec 2015 01:10:56 +0100 Subject: increase horizontal spacing at the edges MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- qt-mobile/qml/DiveList.qml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'qt-mobile/qml/DiveList.qml') 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 -- cgit v1.2.3-70-g09d2