Merge lp:~donadigo/slingshot/correct-count-image-margins into lp:~elementary-pantheon/slingshot/trunk

Proposed by Adam Bieńkowski on 2016-11-07
Status: Merged
Approved by: Daniel Fore on 2016-12-27
Approved revision: 701
Merged at revision: 709
Proposed branch: lp:~donadigo/slingshot/correct-count-image-margins
Merge into: lp:~elementary-pantheon/slingshot/trunk
Diff against target: 30 lines (+5/-3)
1 file modified
src/Widgets/AppEntry.vala (+5/-3)
To merge this branch: bzr merge lp:~donadigo/slingshot/correct-count-image-margins
Reviewer Review Type Date Requested Status
Zisu Andrei 2016-11-07 Approve on 2016-11-10
Review via email: mp+310191@code.launchpad.net

Commit message

* Correct count image margins so they don't get cut off

Description of the change

Fixes bug #1602303: "Sometimes bubbles appears cropped"

This branch corrects the margins to be ICON_SIZE - SURFACE_SIZE which in this case will be 16 instead of 18.

To post a comment you must log in.
Zisu Andrei (matzipan) wrote :

I can confirm this fixes the issue.

Not merging yet on advice from Cody.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Widgets/AppEntry.vala'
2--- src/Widgets/AppEntry.vala 2016-07-05 20:18:20 +0000
3+++ src/Widgets/AppEntry.vala 2016-11-07 14:49:12 +0000
4@@ -60,6 +60,8 @@
5 #endif
6 }
7
8+ private const int ICON_SIZE = 64;
9+
10 #if HAS_PLANK_0_11
11 private const int SURFACE_SIZE = 48;
12 private static Plank.DockTheme plank_theme = new Plank.DockTheme ("Gtk+");
13@@ -97,14 +99,14 @@
14
15 image = new Gtk.Image ();
16 image.gicon = app.icon;
17- image.pixel_size = 64;
18+ image.pixel_size = ICON_SIZE;
19 image.margin_top = 12;
20
21 count_image = new Gtk.Image ();
22 count_image.no_show_all = true;
23 count_image.visible = false;
24- count_image.margin_start = 18;
25- count_image.margin_bottom = 12;
26+ count_image.margin_start = ICON_SIZE - SURFACE_SIZE;
27+ count_image.margin_bottom = ICON_SIZE - SURFACE_SIZE;
28
29 var overlay = new Gtk.Overlay ();
30 overlay.add (image);

Subscribers

People subscribed via source and target branches