[Gtk-sharp-list] How can I use CSS styling in my GTK# application?

Bertrand Lorentz bertrand.lorentz at gmail.com
Thu Oct 30 18:17:27 UTC 2014


Hello,

Styling with CSS is a feature introduced in GTK+ 3.0 (the native C library).
Currently, stable versions of GTK# target GTK+ 2.x, as consequence they
don't provide the CssProvider class.

So if you want to use CSS styling in your GTK# application, you need to use
GTK# 2.99.x, which is still in the beta stage:
https://github.com/mono/gtk-sharp/releases

The Banshee source in git master has been ported to use GTK# 2.99.x, that's
why it uses CssProvider.

I hope this clarifies things for you.

--
Bertrand


On Thu, Oct 30, 2014 at 9:24 AM, don-prog <don-prog at mail.ru> wrote:

> How can I use CSS styling in my GTK# application? I heard before that it is
> impossible to use CSS themes in GTK#, but after that I found  this example
> of using css styling in GTK#
> <
> https://github.com/mono/gtk-sharp/blob/master/sample/GtkDemo/DemoCssBasics.cs
> >
> . Besides this I found also the  samples of using CSS styling in Banshee
> project
> <
> https://github.com/GNOME/banshee/blob/715777b2e9d8a4c3ba9e816c54ae1a104f4653c0/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs
> >
> (which uses GTK#). So how is it possible? I already tried to do the same in
> GTK#, but I didn't find CssProvider class. So how I can find this class in
> GTK# or how I can using CSS styling in GTK#?
>
>
>
>
> --
> View this message in context:
> http://mono.1490590.n4.nabble.com/How-can-I-use-CSS-styling-in-my-GTK-application-tp4664448.html
> Sent from the Mono - Gtk# mailing list archive at Nabble.com.
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20141030/8ef1e6c7/attachment.html>


More information about the Gtk-sharp-list mailing list