Padding, margins, borders and two ways to set them: how does everything work?



Hello,

It appears to me that the handling of padding, margin and widget borders is a bit inconsistencies in GTK+. These properties are defined in different widgets the reasons for that aren't very clear. For example, padding is not fundamentally different from margin, yet padding is included in GtkMisc, whereas margin is in generic GtkWidget.

The above becomes really messy when GtkStyleContext comes into the play. GtkStyleContext provides padding/border/margin combo for all widgets. Based on few experiments, I found out that GtkStyleContext padding/border/margin combo is independent from one provided by the widget properties. That is, the actual spacing is given by the sum of both spacings.

The following are my questions:

How this inconsistency will be resolved? I guess the widget padding/etc properties will be deprecated and removed as GtkStyleContext has been only recently introduced. If this is the case, will GtkStyleProvider be the only way to set such style properties, or will there be additional getters/setters for GtkWidget for example?

    Cheers


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