Can I style GtkBox margin/padding with CSS only?

后端 未结 1 811
深忆病人
深忆病人 2020-12-21 09:29

How can i make layout like this using CSS stylesheet for GTK app?

Here is example code:

#!/usr/bin/py         


        
相关标签:
1条回答
  • 2020-12-21 09:50

    Not right now. GTK doesn't support margin properties on its widgets, and it only supports padding properties on widgets that draw a frame. (Which elements draw a frame can be a bit arbitrary, but Gtk.Box and Gtk.Label don't, so that's why your example doesn't work. You can fake it on any widget by putting it inside a Gtk.Frame though.)

    This blog post reveals that margin and padding are planned to be supported consistently on all widgets in the upcoming GTK 3.20.

    0 讨论(0)
提交回复
热议问题