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

Proposed by Adam Bieńkowski
Status: Merged
Approved by: Danielle Foré
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 (community) Approve
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.
Revision history for this message
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
=== modified file 'src/Widgets/AppEntry.vala'
--- src/Widgets/AppEntry.vala 2016-07-05 20:18:20 +0000
+++ src/Widgets/AppEntry.vala 2016-11-07 14:49:12 +0000
@@ -60,6 +60,8 @@
60#endif60#endif
61 }61 }
6262
63 private const int ICON_SIZE = 64;
64
63#if HAS_PLANK_0_1165#if HAS_PLANK_0_11
64 private const int SURFACE_SIZE = 48;66 private const int SURFACE_SIZE = 48;
65 private static Plank.DockTheme plank_theme = new Plank.DockTheme ("Gtk+");67 private static Plank.DockTheme plank_theme = new Plank.DockTheme ("Gtk+");
@@ -97,14 +99,14 @@
9799
98 image = new Gtk.Image ();100 image = new Gtk.Image ();
99 image.gicon = app.icon;101 image.gicon = app.icon;
100 image.pixel_size = 64;102 image.pixel_size = ICON_SIZE;
101 image.margin_top = 12;103 image.margin_top = 12;
102104
103 count_image = new Gtk.Image ();105 count_image = new Gtk.Image ();
104 count_image.no_show_all = true;106 count_image.no_show_all = true;
105 count_image.visible = false;107 count_image.visible = false;
106 count_image.margin_start = 18;108 count_image.margin_start = ICON_SIZE - SURFACE_SIZE;
107 count_image.margin_bottom = 12;109 count_image.margin_bottom = ICON_SIZE - SURFACE_SIZE;
108110
109 var overlay = new Gtk.Overlay ();111 var overlay = new Gtk.Overlay ();
110 overlay.add (image);112 overlay.add (image);

Subscribers

People subscribed via source and target branches