forked from AuroraMiddleware/gtk
text: React to text attribute changes in css
Recompute the layout when the css style change affects text attributes. This matches what we do in GtkLabel, and without this, changing the font-features-setting css property in the Inspector does not have immediate effect.
This commit is contained in:
parent
81371e7c79
commit
043ffd38bc
@ -3488,11 +3488,13 @@ gtk_text_css_changed (GtkWidget *widget,
|
||||
|
||||
gtk_text_update_cached_style_values (self);
|
||||
|
||||
if (change == NULL ||
|
||||
gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TEXT |
|
||||
if (gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TEXT |
|
||||
GTK_CSS_AFFECTS_BACKGROUND |
|
||||
GTK_CSS_AFFECTS_CONTENT))
|
||||
gtk_widget_queue_draw (GTK_WIDGET (self));
|
||||
gtk_widget_queue_draw (widget);
|
||||
|
||||
if (gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TEXT_ATTRS))
|
||||
gtk_text_recompute (self);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user