Comment 1 for bug 1093349

Revision history for this message
Thiago Teixeira (tvst) wrote : Re: [Bug 1093349] Re: No applet icon in gnome3 fallback session

Awesome! I will give it try on my machine and fix upstream ASAP.

Thanks for working on this!

On Sun, Dec 23, 2012 at 6:38 PM, Gabriel Finkelstein <
<email address hidden>> wrote:

> ** Description changed:
>
> The applet icon is missing in gnome3 on gnome-session-fallback. It only
> shows the label "Menu". I tried putting different values in "applet
> icon" in config.json and none work.
>
> Using Cardapio 0.9.200 in 12.10
>
> PS: I love Cardapio, thanks for all the work!
>
> EDIT:
> I just figured out its because of the GTK "buttons have icons" setting.
> I solved it by overriding that setting in __init__ with:
>
> - settings = Gtk.Settings.get_default()
> - settings.set_property('gtk-button-images', True)
> + {{{ settings = Gtk.Settings.get_default()
> + settings.set_property('gtk-button-images', True)}}}
>
> Although my problem now is that the icon gets cut off at 14px height
> (with a 24px height panel). Right now I'm trying to figure out how to
> remove that 5px padding.
> +
> + EDIT 2:
> + I solved it by adding the following:
> + style_context = self.button.get_style_context()
> + css_provider = Gtk.CssProvider()
> + css = "GtkButton { padding: 0px 3px; } "
> + css_provider.load_from_data(css)
> +
> style_context.add_provider(css_provider,Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
>
> ** Description changed:
>
> The applet icon is missing in gnome3 on gnome-session-fallback. It only
> shows the label "Menu". I tried putting different values in "applet
> icon" in config.json and none work.
>
> Using Cardapio 0.9.200 in 12.10
>
> PS: I love Cardapio, thanks for all the work!
>
> EDIT:
> I just figured out its because of the GTK "buttons have icons" setting.
> I solved it by overriding that setting in __init__ with:
>
> - {{{ settings = Gtk.Settings.get_default()
> - settings.set_property('gtk-button-images', True)}}}
> + settings = Gtk.Settings.get_default()
> + settings.set_property('gtk-button-images', True)
>
> Although my problem now is that the icon gets cut off at 14px height
> (with a 24px height panel). Right now I'm trying to figure out how to
> remove that 5px padding.
>
> EDIT 2:
> I solved it by adding the following:
> - style_context = self.button.get_style_context()
> - css_provider = Gtk.CssProvider()
> - css = "GtkButton { padding: 0px 3px; } "
> - css_provider.load_from_data(css)
> -
> style_context.add_provider(css_provider,Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
> + style_context = self.button.get_style_context()
> + css_provider = Gtk.CssProvider()
> + css = "GtkButton { padding: 0px 3px; } "
> + css_provider.load_from_data(css)
> +
> style_context.add_provider(css_provider,Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
>
> --
> You received this bug notification because you are a member of Cardapio
> team, which is subscribed to Cardapio.
> https://bugs.launchpad.net/bugs/1093349
>
> Title:
> No applet icon in gnome3 fallback session
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/cardapio/+bug/1093349/+subscriptions
>

--

*Thiago Teixeira*http://thiagot.com