From f1fc86f2dbd1ca6b10296744b88267d18d7a25e7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 25 Sep 2014 16:46:59 -0700 Subject: [PATCH] Fix toolbar icon size in GTK+ 3.14: Bug #732065 By setting the icon pixel size, that forces GTK+ to load images installed in our locations rather than the theme's. --- THANKS | 1 + src/client/components/pill-toolbar.vala | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/THANKS b/THANKS index 007ab814..f35d8ada 100644 --- a/THANKS +++ b/THANKS @@ -5,6 +5,7 @@ Jürg Billeter Yosef Or Boczko Martijn Braam Attila Bukor +Matthias Clasen Andrea Corbellini Sergey Shnatsel Davidoff Joanmarie Diggs diff --git a/src/client/components/pill-toolbar.vala b/src/client/components/pill-toolbar.vala index 498236ce..1c9a1a9e 100644 --- a/src/client/components/pill-toolbar.vala +++ b/src/client/components/pill-toolbar.vala @@ -38,8 +38,14 @@ public interface PillBar : Gtk.Container { b.related_action = action_group.get_action(action_name); b.tooltip_text = b.related_action.tooltip; b.related_action.notify["tooltip"].connect(() => { b.tooltip_text = b.related_action.tooltip; }); - b.image = new Gtk.Image.from_icon_name(icon_name != null ? icon_name : + + // set pixel size to force GTK+ to load our images from our installed directory, not the theme + // directory + Gtk.Image image = new Gtk.Image.from_icon_name(icon_name != null ? icon_name : b.related_action.icon_name, Gtk.IconSize.MENU); + image.set_pixel_size(16); + b.image = image; + // Unity buttons are a bit tight #if ENABLE_UNITY b.image.margin = b.image.margin + 4;