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

Proposed by Martin Borho
Status: Merged
Approved by: Martin Borho
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
Raúl Yeguas Approve
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.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
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

replaced spacer Rectangle with a topMargin for Page in Tab

Revision history for this message
Martin Borho (martin-borho) wrote :

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

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'components/LocationTab.qml'
--- components/LocationTab.qml 2013-07-22 19:26:39 +0000
+++ components/LocationTab.qml 2013-07-22 21:43:24 +0000
@@ -68,68 +68,56 @@
68 page: Page {68 page: Page {
69 id: locationPage69 id: locationPage
70 isLeaf: true70 isLeaf: true
71 anchors.top: locationTab.top
72 anchors.fill: parent71 anchors.fill: parent
7372 anchors.topMargin: units.gu(9.5)
7473
75 Rectangle {74 ListModel {
76 id: listContainer75 id: dayForecastModel
7776 }
78 anchors.fill: parent77
79 // TODO: Fix that hardcoded value78 ListView {
80 anchors.topMargin: units.gu(9.5)79 id: dailyForecastList
81 color: "transparent"80 width: parent.width
8281 height:parent.height
83 ListModel {82 model:dayForecastModel
84 id: dayForecastModel83
85 }84 snapMode: ListView.SnapOneItem
8685 verticalLayoutDirection: ListView.TopToBottom
87 ListView {86 flickableDirection: Flickable.VerticalFlick
88 id: dailyForecastList87
89 anchors.fill: parent88 clip: true
90 anchors.top: parent.top89
9190 delegate: Item {
92 model:dayForecastModel91 id: dailyForecastItem
9392 width:parent.width
94 snapMode: ListView.SnapOneItem93 height: locationPage.height
95 verticalLayoutDirection: ListView.TopToBottom94
96 flickableDirection: Flickable.VerticalFlick95 Rectangle {
9796 id: listRectangle
98 clip: true97 width: parent.width
9998 height: dailyForecastList.height
100 delegate: Item {99 anchors.verticalCenter: parent.verticalCenter
101 id: dailyForecastItem100 color: "transparent"
102 width:parent.width101
103 height: listContainer.height102 DateComponent {
104103 id: dateComponent
105 Rectangle {104 dateRelative: dateRel
106 width: parent.width105 dateString: date
107 height: childrenRect.height106 borderTopVisible: false
108 anchors.verticalCenter: parent.verticalCenter107 }
109 color: "transparent"108 CurrentWeather {
110109 currentTemp: temp
111 DateComponent {110 minTemp: tempMin
112 id: dateComponent111 maxTemp: tempMax
113 dateRelative: dateRel112 icon: condIcon
114 dateString: date113 condition: cond
115 borderTopVisible: false114 anchors.top: dateComponent.bottom
116 }
117 CurrentWeather {
118 currentTemp: temp
119 minTemp: tempMin
120 maxTemp: tempMax
121 icon: condIcon
122 condition: cond
123 anchors.top: dateComponent.bottom
124 }
125 }115 }
126 }116 }
127 }117 }
128 }118 }
129119
130120
131
132
133 tools: ToolbarItems {121 tools: ToolbarItems {
134 id: pageTools122 id: pageTools
135 ToolbarButton {123 ToolbarButton {

Subscribers

People subscribed via source and target branches