Hi all,
this is a minor cosmetic patch:
right now when scrolling in the fullscreen horizontal ListView in the
dive details view, it's possible to see the contents oddly cutted
away, making it look a bit buggy.
this patch remove the margins around the list view and transfers them
around the internal item. so it should look the same but when
scrolling horizontally, the contents should go right outside the
screen, instead of being cutted away one gridUnit from the screen
edges

--
Marco Martin
From c22812a329d02667ee4d08c833b61ad82d3e6e38 Mon Sep 17 00:00:00 2001
From: Marco Martin <[email protected]>
Date: Tue, 19 Apr 2016 19:11:07 +0200
Subject: [PATCH] Don't put margins outside the internal ListView

put the margins only around the fullscreen delegate of the listview,
making the listview go all trough the screen edges.
This because the cutted effect when the list view is half scrolled
looks quite ugly. Making the ListView reach the borders
also moves the scroll indicator at the screen edge
where it conventionally is.

Signed-off-by: Marco Martin <[email protected]>
---
 mobile-widgets/qml/DiveDetails.qml     | 4 ++++
 mobile-widgets/qml/DiveDetailsView.qml | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml
index 5a320f0..87fe8f7 100644
--- a/mobile-widgets/qml/DiveDetails.qml
+++ b/mobile-widgets/qml/DiveDetails.qml
@@ -34,6 +34,10 @@ Kirigami.Page {
 
 	title: diveDetailsListView.currentItem ? diveDetailsListView.currentItem.modelData.dive.location : "Dive details"
 	state: "view"
+	leftPadding: 0
+	topPadding: 0
+	rightPadding: 0
+	bottomPadding: 0
 
 	states: [
 		State {
diff --git a/mobile-widgets/qml/DiveDetailsView.qml b/mobile-widgets/qml/DiveDetailsView.qml
index c10c389..cec4908 100644
--- a/mobile-widgets/qml/DiveDetailsView.qml
+++ b/mobile-widgets/qml/DiveDetailsView.qml
@@ -36,7 +36,7 @@ Item {
 			top: parent.top
 			left: parent.left
 			right: parent.right
-			margins: Math.round(Kirigami.Units.gridUnit / 2)
+			margins: Kirigami.Units.gridUnit
 		}
 		columns: 4
 		rowSpacing: Kirigami.Units.smallSpacing * 2
-- 
2.1.4

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to