Re: Custom CSS in GtkBuilder XML
- Date: Mon, 1 Aug 2016 10:04:02 +0100
- From: Emmanuele Bassi <ebassi@xxxxxxxxx>
- Subject: Re: Custom CSS in GtkBuilder XML
On 30 July 2016 at 11:54, lukas@xxxxxxxxxxxxxxxxx
> Using GtkBuilder XML, you can currently only add Styling Information like
> <object class="Foo">
> <class name="predefined-class" />
> So (please correct me if I'm wrong) CSS cannot be added without actions
> outside of this XML File.
> You always have to create a GtkCssProvider and add
> it to the widget's GtkStyleContext in your programming code.
Only if you have custom CSS, yes.
> Wouldn't it be more consistent to allow something like this:
If by "consistent" you mean "convenient", then possibly.
In reality, though, you may want to determine the additional CSS to be
loaded based on programmatic conditions, like the current user theme,
or the current platform. Adding a bunch of conditions to the XML
instead of code is not going to help much in terms of making Glade
[@] ebassi [@gmail.com]
gtk-list mailing list