Merge lp:~nik90/ubuntu-weather-app/fix-swipedelete into lp:ubuntu-weather-app/obsolete.trunk

Proposed by Nekhelesh Ramananthan on 2013-07-21
Status: Merged
Approved by: Martin Borho on 2013-07-21
Approved revision: 74
Merged at revision: 72
Proposed branch: lp:~nik90/ubuntu-weather-app/fix-swipedelete
Merge into: lp:ubuntu-weather-app/obsolete.trunk
Diff against target: 51 lines (+16/-2)
1 file modified
components/SwipeDelete.qml (+16/-2)
To merge this branch: bzr merge lp:~nik90/ubuntu-weather-app/fix-swipedelete
Reviewer Review Type Date Requested Status
Martin Borho 2013-07-21 Approve on 2013-07-21
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve on 2013-07-21
Review via email: mp+176048@code.launchpad.net

Commit message

Fixes incorrect assignment of static colours in the swipeDelete component. It now uses theme palette to change dynamically according to the current theme. Also added a trash icon as requested by design for the clock app.

Description of the change

Fixes incorrect assignment of static colours in the swipeDelete component. It now uses theme palette to change dynamically according to the current theme. Also added a trash icon as requested by design for the clock app. I would assume it would also apply to other core apps to maintain consistency.

To post a comment you must log in.
73. By Nekhelesh Ramananthan on 2013-07-21

Added trash icon

74. By Nekhelesh Ramananthan on 2013-07-21

Simplified anchor definition

Martin Borho (martin-borho) wrote :

Thanks Nekhelesh, you possess a great overview!

review: Approve
Nekhelesh Ramananthan (nik90) wrote :

hehe I generally keep track of the commits of weather since we do lot of similar functions :).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components/SwipeDelete.qml'
2--- components/SwipeDelete.qml 2013-07-16 09:39:11 +0000
3+++ components/SwipeDelete.qml 2013-07-21 11:07:25 +0000
4@@ -23,7 +23,17 @@
5 id: swipeBackgroundItem
6
7 anchors.fill: parent
8- color: UbuntuColors.orange
9+ color: Theme.palette.normal.base
10+
11+ Image {
12+ id: swipeDeleteIcon
13+
14+ property int slidingMargin: units.gu(10)
15+
16+ anchors.fill: parent
17+ verticalAlignment: Image.AlignVCenter
18+ fillMode: Image.Pad
19+ }
20
21 Label {
22 id: swipeBackgroundText
23@@ -32,7 +42,7 @@
24
25 anchors.fill: parent
26 verticalAlignment: Text.AlignVCenter
27- color: "#FFFFFF"
28+ color: Theme.palette.normal.baseText
29 }
30
31 states: [
32@@ -40,12 +50,16 @@
33 name: "SwipingRight"
34 PropertyChanges { target: swipeBackgroundText; anchors.rightMargin: swipeBackgroundText.slidingMargin
35 anchors.leftMargin: 0; horizontalAlignment: Text.AlignRight; text: i18n.tr("Delete") }
36+ PropertyChanges { target: swipeDeleteIcon; anchors.rightMargin: swipeDeleteIcon.slidingMargin
37+ anchors.leftMargin: 0; horizontalAlignment: Image.AlignRight; source: Qt.resolvedUrl("../resources/images/trash_icon.png")}
38 },
39
40 State {
41 name: "SwipingLeft"
42 PropertyChanges { target: swipeBackgroundText; anchors.rightMargin: 0; anchors.leftMargin: swipeBackgroundText.slidingMargin
43 horizontalAlignment: Text.AlignLeft; text: i18n.tr("Delete") }
44+ PropertyChanges { target: swipeDeleteIcon; anchors.rightMargin: 0; source: Qt.resolvedUrl("../resources/images/trash_icon.png")
45+ anchors.leftMargin: swipeDeleteIcon.slidingMargin; horizontalAlignment: Image.AlignLeft }
46 }
47 ]
48 }
49
50=== added file 'resources/images/trash_icon@16.png'
51Binary files resources/images/trash_icon@16.png 1970-01-01 00:00:00 +0000 and resources/images/trash_icon@16.png 2013-07-21 11:07:25 +0000 differ

Subscribers

People subscribed via source and target branches