Hi, I am trying to custom my app using css, and I am missing a bunch of properties I can’t find in the documentation, like grid spacing, switch slider color, and so on.
Where can I see a list of css supported properties?
I am looking at the API here:
https://developer.gnome.org/gtkmm/stable/classGtk_1_1Grid.html
You should look at the C API reference for the selectors used by each class:
- https://developer.gnome.org/gtk3/stable/GtkGrid.html#GtkGrid.description
- https://developer.gnome.org/gtk3/stable/GtkSwitch.html#GtkSwitch.description
The supported properties are also part of the C API reference:
Thx!
Can I set the row and column spacing using css?
Currently I’m calling set_row_spacing() but I want all styling done in css
You can use the CSS padding and margin on each child.
Thx, 2 more if you will:
- I changed the color of the switch slider to green, but when I select the switch the color I chose changes. It goes back to the desired color only when the widget loses focus. Can I set the switch color back when another control receives the focus?
- I have a scale control, can I have the value show percentage? How to I modify the slider color?
You’ll need a selector for the :focus
state. You should look at the CSS overview, and any other W3C CSS guide. GTK tries to match the standard CSS; any deviation or addition is documented.
Have you looked at the GtkScale
documentation? For instance, the GtkScale::format-value
signal, and the CSS selectors applied to the scale widget?
THX for your help!!!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.