Re: Problem with st_widget_set_theme()



On Sun, Jul 22, 2012 at 1:35 PM, Michele <micxgx gmail com> wrote:
> As far as I know, the extension stylesheet has a lower priority than
> the default or theme ones. This means that style cannot be easily
> overwritten.

Thanks for reminding me about that. I need to get around to fixing that.

> I tried to use st_widget_set_theme() in order to: "Overrides the theme
> that would be inherited from the actor's parent or the stage with an
> entirely new theme (set of stylesheets)" [documentation].
>
> I've created a new St.Theme with swapped application_stylesheet
> default_stylesheet
>
> theme = new St.Theme({application_stylesheet: 'path_to_custom_css',
> default_staylesheet: 'path_to_default_css'});
>
> and tried to apply it to a St.Box widget
>
> widget.set_theme(theme);

StWidget.set_theme was outright broken in earlier releases. It's been
fixed for 3.6.

> but It doesn't seem to work and I get the following message:
>
> Window manager warning: Log level 8: g_object_ref: assertion
> `G_IS_OBJECT (object)'
>
> Any way to get over the problem? Applying the same theme to the stage
> seems to work properly instead:
>
> themecontext = St.ThemeContext.get_for_stage(global.stage);
> themeContext.set_theme(theme);
> _______________________________________________
> gnome-shell-list mailing list
> gnome-shell-list gnome org
> https://mail.gnome.org/mailman/listinfo/gnome-shell-list



-- 
  Jasper


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]