Merge lp:~martin-borho/ubuntu-weather-app/TabPage-spacer into lp:ubuntu-weather-app/obsolete.trunk

Proposed by Martin Borho on 2013-07-22
Status: Merged
Approved by: Martin Borho on 2013-07-23
Approved revision: 75
Merged at revision: 75
Proposed branch: lp:~martin-borho/ubuntu-weather-app/TabPage-spacer
Merge into: lp:ubuntu-weather-app/obsolete.trunk
Diff against target: 115 lines (+43/-55)
1 file modified
components/LocationTab.qml (+43/-55)
To merge this branch: bzr merge lp:~martin-borho/ubuntu-weather-app/TabPage-spacer
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve on 2013-07-22
Raúl Yeguas 2013-07-22 Approve on 2013-07-22
Review via email: mp+176288@code.launchpad.net

Commit message

Moved tab content on page top.

Description of the change

Tried to remove the space between top and page content in LocationTab. Using transparent Rectangle on top to avoid that the tab content is visbile in header background.

To post a comment you must log in.
Raúl Yeguas (neokore) wrote :

That's a good trick.
To shorten it, maybe we could replace "Rectangle {id: headerSpacer ... }" with a anchors.topMargin: units.gu(9.5) on locationPage, what do you think?

review: Approve
75. By Martin Borho on 2013-07-22

replaced spacer Rectangle with a topMargin for Page in Tab

Martin Borho (martin-borho) wrote :

Even better! Replaced the Rectangle with a topMargin for the Page.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components/LocationTab.qml'
2--- components/LocationTab.qml 2013-07-22 19:26:39 +0000
3+++ components/LocationTab.qml 2013-07-22 21:43:24 +0000
4@@ -68,68 +68,56 @@
5 page: Page {
6 id: locationPage
7 isLeaf: true
8- anchors.top: locationTab.top
9 anchors.fill: parent
10-
11-
12- Rectangle {
13- id: listContainer
14-
15- anchors.fill: parent
16- // TODO: Fix that hardcoded value
17- anchors.topMargin: units.gu(9.5)
18- color: "transparent"
19-
20- ListModel {
21- id: dayForecastModel
22- }
23-
24- ListView {
25- id: dailyForecastList
26- anchors.fill: parent
27- anchors.top: parent.top
28-
29- model:dayForecastModel
30-
31- snapMode: ListView.SnapOneItem
32- verticalLayoutDirection: ListView.TopToBottom
33- flickableDirection: Flickable.VerticalFlick
34-
35- clip: true
36-
37- delegate: Item {
38- id: dailyForecastItem
39- width:parent.width
40- height: listContainer.height
41-
42- Rectangle {
43- width: parent.width
44- height: childrenRect.height
45- anchors.verticalCenter: parent.verticalCenter
46- color: "transparent"
47-
48- DateComponent {
49- id: dateComponent
50- dateRelative: dateRel
51- dateString: date
52- borderTopVisible: false
53- }
54- CurrentWeather {
55- currentTemp: temp
56- minTemp: tempMin
57- maxTemp: tempMax
58- icon: condIcon
59- condition: cond
60- anchors.top: dateComponent.bottom
61- }
62+ anchors.topMargin: units.gu(9.5)
63+
64+ ListModel {
65+ id: dayForecastModel
66+ }
67+
68+ ListView {
69+ id: dailyForecastList
70+ width: parent.width
71+ height:parent.height
72+ model:dayForecastModel
73+
74+ snapMode: ListView.SnapOneItem
75+ verticalLayoutDirection: ListView.TopToBottom
76+ flickableDirection: Flickable.VerticalFlick
77+
78+ clip: true
79+
80+ delegate: Item {
81+ id: dailyForecastItem
82+ width:parent.width
83+ height: locationPage.height
84+
85+ Rectangle {
86+ id: listRectangle
87+ width: parent.width
88+ height: dailyForecastList.height
89+ anchors.verticalCenter: parent.verticalCenter
90+ color: "transparent"
91+
92+ DateComponent {
93+ id: dateComponent
94+ dateRelative: dateRel
95+ dateString: date
96+ borderTopVisible: false
97+ }
98+ CurrentWeather {
99+ currentTemp: temp
100+ minTemp: tempMin
101+ maxTemp: tempMax
102+ icon: condIcon
103+ condition: cond
104+ anchors.top: dateComponent.bottom
105 }
106 }
107 }
108 }
109
110
111-
112-
113 tools: ToolbarItems {
114 id: pageTools
115 ToolbarButton {

Subscribers

People subscribed via source and target branches