8

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

1 Answer 1

9

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.