settings: Provide a default style cascade per scale
This guarantees we only create 1 extra style cascade in total for hidpi and not one per style context. Style cascades are now nested like this: GtkSettings root cascade (scale == 1) | +-- GtkSettings per scale cascade (for any scale, no custom providers) | +-- GtkStyleContext custom cascade (for any scale, custom providers) This requires a bunch of care when changing cascade-related properties inside GtkStyleContext, so that it ends up with a properly setup cascade, but I think I got those cases right. The only thing we don't do yet is reverting to a GtkSettings cascade when the last custom provider is removed from a custom cascade.
This commit is contained in:
		| @ -38,7 +38,8 @@ gboolean            _gtk_settings_parse_convert              (GtkRcPropertyParse | ||||
|                                                               GParamSpec             *pspec, | ||||
|                                                               GValue                 *dest_value); | ||||
| GdkScreen          *_gtk_settings_get_screen                 (GtkSettings            *settings); | ||||
| GtkStyleCascade    *_gtk_settings_get_style_cascade          (GtkSettings            *settings); | ||||
| GtkStyleCascade    *_gtk_settings_get_style_cascade          (GtkSettings            *settings, | ||||
|                                                               gint                    scale); | ||||
|  | ||||
| typedef enum | ||||
| { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Benjamin Otte
					Benjamin Otte