Merge lp:~robru/gwibber/margins into lp:gwibber

Proposed by Robert Bruce Park
Status: Merged
Approved by: Ken VanDine
Approved revision: 1425
Merged at revision: 1424
Proposed branch: lp:~robru/gwibber/margins
Merge into: lp:gwibber
Diff against target: 35 lines (+3/-4)
2 files modified
qml/StatusUpdateTileDetails.qml (+1/-1)
qml/ThreadView.qml (+2/-3)
To merge this branch: bzr merge lp:~robru/gwibber/margins
Reviewer Review Type Date Requested Status
Ken VanDine Approve
Review via email: mp+154259@code.launchpad.net

Commit message

Add some margins in places to make the app more sexy and less cluttered.

Description of the change

Alright Ken, here's my very first dabble with Qml. It's modest, alright, but it fixes some visual margin glitches that were annoying me, so I'd say this makes everything sexier.

One thing that would be super handy for getting me (and the community) up to speed would be if you could put some comments in things! I had to guess which file contained the widgets I was looking for, and it was all rather frustrating to figure out which was the right widget to accept certain properties. It turns out you can't just slap random margins onto things and have it work, like I'm used to from CSS. In fact, I wrote dozens of lines of "bottomMargin: units.gu(2)" or "height: childrenRect.height + units.gu(2)" in various places, and most had no discernable effect at all. So it seems Qml's layout model is quite sensitive to having the margins be in the "right" places, but so far I haven't figured out which ones are the right ones. It's all just guesswork...

Based on what I saw, it did seem as though you had a fairly logical layout for how your widgets were organized, but yeah, documentation would be nice.

Thanks Ken!

To post a comment you must log in.
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Looks great!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/StatusUpdateTileDetails.qml'
2--- qml/StatusUpdateTileDetails.qml 2013-03-16 03:55:27 +0000
3+++ qml/StatusUpdateTileDetails.qml 2013-03-20 05:10:45 +0000
4@@ -22,7 +22,7 @@
5
6 Item {
7 id: details
8- height: visible ? entryArea.height + pictureWrapper.height + threadView.height + units.gu(2) : 0
9+ height: visible ? entryArea.height + pictureWrapper.height + threadView.height + units.gu(3) : 0
10
11 property alias hasFocus: entryArea.activeFocus
12 onFocusChanged: {
13
14=== modified file 'qml/ThreadView.qml'
15--- qml/ThreadView.qml 2013-03-15 05:33:37 +0000
16+++ qml/ThreadView.qml 2013-03-20 05:10:45 +0000
17@@ -66,11 +66,11 @@
18 rightMargin: units.gu(1)
19 }
20 width: parent.width - avatarImage.width
21- height: childrenRect.height
22+ height: childrenRect.height + units.gu(1)
23
24 Column {
25 width: parent.width
26- spacing: units.gu(1)
27+ spacing: 0
28 anchors {
29 left: parent.left;
30 right: parent.right
31@@ -113,4 +113,3 @@
32 }
33 }
34 }
35-