Custom CSS in GtkBuilder XML

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

 



Hi!

Using GtkBuilder XML, you can currently only add Styling Information like so:

<object class="Foo">
    <style>
        <class name="predefined-class" />
    </style>
</object>

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.

Wouldn't it be more consistent to allow something like this:

<object class="Foo">
    <style>
        <provider path="path-to.css" />
        <class name="mycustomclass" />
    </style>
</object>

This would separate the GUI and the actual programming Logic way better and thus make building GUIs with tools like Glade easier.

Cheers,
Lukas

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux