Merge lp:~nik90/ureadit/beautify-post-listing into lp:~mhall119/ureadit/2.0

Proposed by Nekhelesh Ramananthan
Status: Approved
Approved by: Michael Hall
Approved revision: 23
Proposed branch: lp:~nik90/ureadit/beautify-post-listing
Merge into: lp:~mhall119/ureadit/2.0
Diff against target: 221 lines (+61/-27)
3 files modified
components/SmallImagePostItem.qml (+36/-16)
components/UserMessageItem.qml (+24/-11)
ui/UserMessagesPage.qml (+1/-0)
To merge this branch: bzr merge lp:~nik90/ureadit/beautify-post-listing
Reviewer Review Type Date Requested Status
Michael Hall Approve
Review via email: mp+246183@code.launchpad.net

Commit message

This MP adds spacing and margins for the SmallImagePostItem.qml to get a more spacious feel.

Description of the change

This MP adds spacing and margins for the SmallImagePostItem.qml to get a more spacious feel.

Here is how it looks now,
- http://imgur.com/FLcVyen
- http://imgur.com/Lj4VqWb

To post a comment you must log in.
22. By Nekhelesh Ramananthan

Merged parent branch

23. By Nekhelesh Ramananthan

Applied similar beautification of the user messages page

Revision history for this message
Michael Hall (mhall119) wrote :

Very late in reviewing and merging this, sorry about that, thanks for the improvements

review: Approve

Unmerged revisions

23. By Nekhelesh Ramananthan

Applied similar beautification of the user messages page

22. By Nekhelesh Ramananthan

Merged parent branch

21. By Nekhelesh Ramananthan

Added margins and spacing to beautify small image post items

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'components/SmallImagePostItem.qml'
--- components/SmallImagePostItem.qml 2015-01-09 15:31:22 +0000
+++ components/SmallImagePostItem.qml 2015-01-13 13:04:48 +0000
@@ -3,6 +3,7 @@
33
4Item {4Item {
5 id: postitemroot5 id: postitemroot
6
6 property string title: parent.title7 property string title: parent.title
7 property string text: parent.text8 property string text: parent.text
8 property string score: parent.score9 property string score: parent.score
@@ -19,6 +20,8 @@
19 Rectangle {20 Rectangle {
20 color: "#222222"21 color: "#222222"
21 anchors.fill: parent22 anchors.fill: parent
23 anchors.leftMargin: units.gu(1)
24 anchors.rightMargin: units.gu(1)
22 border.color: "#111111"25 border.color: "#111111"
23 Image {26 Image {
24 id: postThumbnail27 id: postThumbnail
@@ -37,10 +40,14 @@
3740
38 Label {41 Label {
39 id: titleLabel42 id: titleLabel
40 anchors.left: postThumbnail.right43
41 anchors.leftMargin: units.gu(1)44 anchors {
42 anchors.right: parent.right45 top: parent.top
43 y: parent.y46 topMargin: units.gu(1)
47 left: postThumbnail.right
48 leftMargin: units.gu(1)
49 right: parent.right
50 }
4451
45 fontSize: "medium"52 fontSize: "medium"
46 font.weight: Font.DemiBold53 font.weight: Font.DemiBold
@@ -51,6 +58,7 @@
51 wrapMode: Text.WordWrap58 wrapMode: Text.WordWrap
5259
53 text: postitemroot.title60 text: postitemroot.title
61
54 MouseArea {62 MouseArea {
55 anchors.fill: parent63 anchors.fill: parent
56 onClicked: postitemroot.parent.clicked()64 onClicked: postitemroot.parent.clicked()
@@ -59,10 +67,14 @@
5967
60 Label {68 Label {
61 id: authorLabel69 id: authorLabel
62 anchors.left: postThumbnail.right70
63 anchors.leftMargin: units.gu(1)71 anchors {
64 anchors.top: titleLabel.bottom72 top: titleLabel.bottom
65 anchors.right: domainLabel.left73 topMargin: units.gu(1)
74 left: postThumbnail.right
75 leftMargin: units.gu(1)
76 right: domainLabel.left
77 }
6678
67 fontSize: "small"79 fontSize: "small"
68 font.weight: Font.Light80 font.weight: Font.Light
@@ -74,9 +86,13 @@
7486
75 Label {87 Label {
76 id: domainLabel88 id: domainLabel
77 anchors.right: parent.right89
78 anchors.rightMargin: units.gu(1)90 anchors {
79 anchors.top: titleLabel.bottom91 right: parent.right
92 rightMargin: units.gu(1)
93 top: titleLabel.bottom
94 topMargin: units.gu(1)
95 }
8096
81 fontSize: "small"97 fontSize: "small"
82 font.weight: Font.Light98 font.weight: Font.Light
@@ -86,11 +102,15 @@
86102
87 Label {103 Label {
88 id: selfTextLabel104 id: selfTextLabel
89 anchors.left: postThumbnail.right105
90 anchors.leftMargin: units.gu(1)106 anchors {
91 anchors.right: parent.right107 left: postThumbnail.right
92 anchors.top: authorLabel.bottom108 leftMargin: units.gu(1)
93 anchors.bottom: actionsRow.top109 right: parent.right
110 top: authorLabel.bottom
111 topMargin: units.gu(1)
112 bottom: actionsRow.top
113 }
94114
95 fontSize: "small"115 fontSize: "small"
96 font.weight: Font.Light116 font.weight: Font.Light
97117
=== modified file 'components/UserMessageItem.qml'
--- components/UserMessageItem.qml 2015-01-13 03:09:22 +0000
+++ components/UserMessageItem.qml 2015-01-13 13:04:48 +0000
@@ -5,14 +5,19 @@
55
6Rectangle {6Rectangle {
7 id: userMessageItem7 id: userMessageItem
8
8 property var messageObj9 property var messageObj
9 color: UbuntuColors.darkGrey
10 property string score: parent.score10 property string score: parent.score
11 property var likes: parent.likes11 property var likes: parent.likes
1212
13 width: parent.width13 color: UbuntuColors.darkGrey
14 height: childrenRect.height14 height: childrenRect.height
15 anchors.horizontalCenter: parent.horizontalCenter15
16 anchors {
17 left: parent.left
18 right: parent.right
19 margins: units.gu(1)
20 }
1621
17 signal clicked22 signal clicked
18 signal upvoteClicked23 signal upvoteClicked
@@ -31,17 +36,23 @@
3136
32 Column {37 Column {
33 id: messageContents38 id: messageContents
34 anchors.topMargin: units.gu(1)39
35 anchors.left: parent.left40 anchors {
36 anchors.leftMargin: units.gu(1)41 top: parent.top
37 anchors.right: parent.right42 left: parent.left
43 right: parent.right
44 margins: units.gu(1)
45 }
46
38 spacing: units.gu(1)47 spacing: units.gu(1)
48
39 Label {49 Label {
40 id: title50 id: title
41 anchors.left: parent.left51 anchors.left: parent.left
42 anchors.topMargin: units.gu(1)52 anchors.right: parent.right
43 color: 'lightblue'53 color: 'lightblue'
44 fontSize: "medium"54 fontSize: "medium"
55 wrapMode: Text.WordWrap
45 font.weight: messageObj.data.new ? Font.Bold : Font.Normal56 font.weight: messageObj.data.new ? Font.Bold : Font.Normal
46 text: messageObj && messageObj.data.link_title ? messageObj.data.link_title : ""57 text: messageObj && messageObj.data.link_title ? messageObj.data.link_title : ""
47 visible: messageObj ? (messageObj.kind === "t1" || messageObj.kind === "t3") : false58 visible: messageObj ? (messageObj.kind === "t1" || messageObj.kind === "t3") : false
@@ -50,7 +61,6 @@
50 Label {61 Label {
51 id: name62 id: name
52 anchors.left: parent.left63 anchors.left: parent.left
53 anchors.topMargin: units.gu(1)
54 color: Qt.darker(UbuntuColors.warmGrey, 1.5)64 color: Qt.darker(UbuntuColors.warmGrey, 1.5)
55 fontSize: "small"65 fontSize: "small"
56 text: messageObj ? messageObj.data.author : ""66 text: messageObj ? messageObj.data.author : ""
@@ -59,7 +69,7 @@
5969
60 Label {70 Label {
61 id: body71 id: body
62 width: parent.width - units.gu(depth+2)72 //width: parent.width - units.gu(depth+2)
63 wrapMode: Text.WordWrap73 wrapMode: Text.WordWrap
64 anchors.left: parent.left74 anchors.left: parent.left
65 anchors.right: parent.right75 anchors.right: parent.right
@@ -80,13 +90,14 @@
80 id: actionsRow90 id: actionsRow
81 anchors.left: messageContents.left91 anchors.left: messageContents.left
82 anchors.right: messageContents.right92 anchors.right: messageContents.right
83 height: units.gu(3)93 height: units.gu(5)
8494
85 Icon {95 Icon {
86 x: 1*(messageContents.width / 3)-(messageContents.width / 6)-(width/2)96 x: 1*(messageContents.width / 3)-(messageContents.width / 6)-(width/2)
87 source: Qt.resolvedUrl("../images/upvote.png")97 source: Qt.resolvedUrl("../images/upvote.png")
88 width: units.gu(2)98 width: units.gu(2)
89 height: units.gu(2)99 height: units.gu(2)
100 anchors.verticalCenter: parent.verticalCenter
90 color: userMessageItem.likes === true ? UbuntuColors.orange : UbuntuColors.warmGrey101 color: userMessageItem.likes === true ? UbuntuColors.orange : UbuntuColors.warmGrey
91102
92 MouseArea {103 MouseArea {
@@ -101,6 +112,7 @@
101 source: Qt.resolvedUrl("../images/downvote.png")112 source: Qt.resolvedUrl("../images/downvote.png")
102 width: units.gu(2)113 width: units.gu(2)
103 height: units.gu(2)114 height: units.gu(2)
115 anchors.verticalCenter: parent.verticalCenter
104 color: userMessageItem.likes === false ? UbuntuColors.blue : UbuntuColors.warmGrey116 color: userMessageItem.likes === false ? UbuntuColors.blue : UbuntuColors.warmGrey
105117
106 MouseArea {118 MouseArea {
@@ -116,6 +128,7 @@
116 name: "new-message"128 name: "new-message"
117 width: units.gu(2)129 width: units.gu(2)
118 height: units.gu(2.5)130 height: units.gu(2.5)
131 anchors.verticalCenter: parent.verticalCenter
119 color: UbuntuColors.warmGrey132 color: UbuntuColors.warmGrey
120133
121 MouseArea {134 MouseArea {
122135
=== modified file 'ui/UserMessagesPage.qml'
--- ui/UserMessagesPage.qml 2015-01-13 03:02:31 +0000
+++ ui/UserMessagesPage.qml 2015-01-13 13:04:48 +0000
@@ -22,6 +22,7 @@
22 ListView {22 ListView {
23 id: messagesList23 id: messagesList
24 anchors.fill: parent24 anchors.fill: parent
25 spacing: units.gu(1)
2526
26 model: UserMessagesListModel {27 model: UserMessagesListModel {
27 id: commentsModel28 id: commentsModel

Subscribers

People subscribed via source and target branches