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

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Martin Borho
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 Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
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

Added trash icon

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

Simplified anchor definition

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
Martin Borho (martin-borho) wrote :

Thanks Nekhelesh, you possess a great overview!

review: Approve
Revision history for this message
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
=== modified file 'components/SwipeDelete.qml'
--- components/SwipeDelete.qml 2013-07-16 09:39:11 +0000
+++ components/SwipeDelete.qml 2013-07-21 11:07:25 +0000
@@ -23,7 +23,17 @@
23 id: swipeBackgroundItem23 id: swipeBackgroundItem
2424
25 anchors.fill: parent25 anchors.fill: parent
26 color: UbuntuColors.orange26 color: Theme.palette.normal.base
27
28 Image {
29 id: swipeDeleteIcon
30
31 property int slidingMargin: units.gu(10)
32
33 anchors.fill: parent
34 verticalAlignment: Image.AlignVCenter
35 fillMode: Image.Pad
36 }
2737
28 Label {38 Label {
29 id: swipeBackgroundText39 id: swipeBackgroundText
@@ -32,7 +42,7 @@
3242
33 anchors.fill: parent43 anchors.fill: parent
34 verticalAlignment: Text.AlignVCenter44 verticalAlignment: Text.AlignVCenter
35 color: "#FFFFFF"45 color: Theme.palette.normal.baseText
36 }46 }
3747
38 states: [48 states: [
@@ -40,12 +50,16 @@
40 name: "SwipingRight"50 name: "SwipingRight"
41 PropertyChanges { target: swipeBackgroundText; anchors.rightMargin: swipeBackgroundText.slidingMargin51 PropertyChanges { target: swipeBackgroundText; anchors.rightMargin: swipeBackgroundText.slidingMargin
42 anchors.leftMargin: 0; horizontalAlignment: Text.AlignRight; text: i18n.tr("Delete") }52 anchors.leftMargin: 0; horizontalAlignment: Text.AlignRight; text: i18n.tr("Delete") }
53 PropertyChanges { target: swipeDeleteIcon; anchors.rightMargin: swipeDeleteIcon.slidingMargin
54 anchors.leftMargin: 0; horizontalAlignment: Image.AlignRight; source: Qt.resolvedUrl("../resources/images/trash_icon.png")}
43 },55 },
4456
45 State {57 State {
46 name: "SwipingLeft"58 name: "SwipingLeft"
47 PropertyChanges { target: swipeBackgroundText; anchors.rightMargin: 0; anchors.leftMargin: swipeBackgroundText.slidingMargin59 PropertyChanges { target: swipeBackgroundText; anchors.rightMargin: 0; anchors.leftMargin: swipeBackgroundText.slidingMargin
48 horizontalAlignment: Text.AlignLeft; text: i18n.tr("Delete") }60 horizontalAlignment: Text.AlignLeft; text: i18n.tr("Delete") }
61 PropertyChanges { target: swipeDeleteIcon; anchors.rightMargin: 0; source: Qt.resolvedUrl("../resources/images/trash_icon.png")
62 anchors.leftMargin: swipeDeleteIcon.slidingMargin; horizontalAlignment: Image.AlignLeft }
49 }63 }
50 ]64 ]
51}65}
5266
=== added file 'resources/images/trash_icon@16.png'
53Binary 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 differ67Binary 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