Merge lp:~ken-vandine/gwibber/poster_draw_size into lp:gwibber

Proposed by Ken VanDine
Status: Merged
Merged at revision: 1217
Proposed branch: lp:~ken-vandine/gwibber/poster_draw_size
Merge into: lp:gwibber
Diff against target: 33 lines (+4/-1)
2 files modified
client/stream-entry.vala (+3/-1)
client/tab-bar.vala (+1/-0)
To merge this branch: bzr merge lp:~ken-vandine/gwibber/poster_draw_size
Reviewer Review Type Date Requested Status
Michael Terry (community) Approve
Review via email: mp+81914@code.launchpad.net

Description of the change

This branch adds a special case to reduce the padding at the bottom of the entry widget, but only when displayed in the client.

Previously, the entry widget was cutting off the bottom 12 pixels and only drawing above that. This worked fine in the gwibber client, but not in gwibber-poster. When running gwibber-poster, it would display a gray area in that space because we aren't drawing in that area.

To post a comment you must log in.
Revision history for this message
Michael Terry (mterry) wrote :

Tested it, looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'client/stream-entry.vala'
2--- client/stream-entry.vala 2011-10-04 18:39:11 +0000
3+++ client/stream-entry.vala 2011-11-10 21:54:25 +0000
4@@ -29,6 +29,7 @@
5 private uint _anim_id = 0;
6 private float _anim_offset = 0.0f;
7 private int64 _anim_start = 0;
8+ public bool in_client = false;
9
10 public GwibberGtk.AccountTargetBar target_bar;
11
12@@ -212,7 +213,8 @@
13
14 cr.translate (0, (-1 * a.height) + (a.height * _anim_offset));
15
16- a.height -= 12;
17+ if (in_client)
18+ a.height -= 12;
19
20 var r = 4.0f; //radius
21 cr.rectangle (a.x, a.y, a.width, a.height);
22
23=== modified file 'client/tab-bar.vala'
24--- client/tab-bar.vala 2011-10-26 15:56:47 +0000
25+++ client/tab-bar.vala 2011-11-10 21:54:25 +0000
26@@ -101,6 +101,7 @@
27 _tab_box.pack_end (_write_item, false, true, 0);
28
29 _entry = new StreamEntry ();
30+ _entry.in_client = true;
31 _layout.put (_entry, 0, 0);
32 _entry.notify["showing"].connect (()=>
33 {