Merge lp:~rpadovani/ubuntu-weather-app/1198541 into lp:ubuntu-weather-app/obsolete.trunk

Proposed by Riccardo Padovani
Status: Merged
Approved by: Martin Borho
Approved revision: 65
Merged at revision: 66
Proposed branch: lp:~rpadovani/ubuntu-weather-app/1198541
Merge into: lp:ubuntu-weather-app/obsolete.trunk
Diff against target: 72 lines (+54/-3)
2 files modified
components/LocationManagerPage.qml (+3/-3)
components/SwipeDelete.qml (+51/-0)
To merge this branch: bzr merge lp:~rpadovani/ubuntu-weather-app/1198541
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Martin Borho Approve
Review via email: mp+174955@code.launchpad.net

Commit message

Added text delete when swiping a location, based on work of Nekhelesh Ramananthan in clock app

Description of the change

Added text delete when swiping a location, based on work of Nekhelesh Ramananthan in clock app

To post a comment you must log in.
Revision history for this message
Martin Borho (martin-borho) wrote :

Fein, looks good!

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'components/LocationManagerPage.qml'
--- components/LocationManagerPage.qml 2013-07-03 19:39:29 +0000
+++ components/LocationManagerPage.qml 2013-07-16 09:44:36 +0000
@@ -165,9 +165,9 @@
165 storage.clearLocation(location.dbId);165 storage.clearLocation(location.dbId);
166 locationModel.remove(index)166 locationModel.remove(index)
167 }167 }
168 backgroundIndicator: Rectangle {168 backgroundIndicator: SwipeDelete {
169 anchors.fill: parent169 id: swipeDelete
170 color: "gray"170 state: swipingState
171 }171 }
172 }172 }
173 footer: ListItem.Standard {173 footer: ListItem.Standard {
174174
=== added file 'components/SwipeDelete.qml'
--- components/SwipeDelete.qml 1970-01-01 00:00:00 +0000
+++ components/SwipeDelete.qml 2013-07-16 09:44:36 +0000
@@ -0,0 +1,51 @@
1/*
2 * Copyright (C) 2013 Canonical Ltd
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Nekhelesh Ramananthan <krnekhelesh@gmail.com>
17 */
18
19import QtQuick 2.0
20import Ubuntu.Components 0.1
21
22Rectangle {
23 id: swipeBackgroundItem
24
25 anchors.fill: parent
26 color: UbuntuColors.orange
27
28 Label {
29 id: swipeBackgroundText
30
31 property int slidingMargin: units.gu(3)
32
33 anchors.fill: parent
34 verticalAlignment: Text.AlignVCenter
35 color: "#FFFFFF"
36 }
37
38 states: [
39 State {
40 name: "SwipingRight"
41 PropertyChanges { target: swipeBackgroundText; anchors.rightMargin: swipeBackgroundText.slidingMargin
42 anchors.leftMargin: 0; horizontalAlignment: Text.AlignRight; text: i18n.tr("Delete") }
43 },
44
45 State {
46 name: "SwipingLeft"
47 PropertyChanges { target: swipeBackgroundText; anchors.rightMargin: 0; anchors.leftMargin: swipeBackgroundText.slidingMargin
48 horizontalAlignment: Text.AlignLeft; text: i18n.tr("Delete") }
49 }
50 ]
51}

Subscribers

People subscribed via source and target branches