I'm trying to create a custom GTK Theme based on Adwaita, but I don't know how to set specific dimensions to some components only using CSS. Example: I want each selector ".titlebar .button" sized to 60x50 pixels. Thanks in advance
You can't. Sizing and positioning are layout properties, and not under the remit of the theming machinery, which is exposed via CSS.
If you could change sizing and position via the theming infrastructure, you'd be able to change the way applications are presented; while this works fine for web pages and the CSS Zen Garden, it does not map to desktop applications.
At most, you can specify CSS margins and padding on top of the existing preferred size of a widget.
If you want to set the minimum size of a GtkWidget
, use gtk_widget_set_size_request() from your application code instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With