Merge branch 'rtl-label-hickup' into 'main'

label: Clear layout when text direction changes

Closes #6836

See merge request GNOME/gtk!7497
This commit is contained in:
Matthias Clasen 2024-07-26 18:13:28 +00:00
commit 5e52cefb28

View File

@ -2270,6 +2270,13 @@ gtk_label_copy_clipboard (GtkLabel *self)
}
}
static void
gtk_label_direction_changed (GtkWidget *widget,
GtkTextDirection previous_direction)
{
gtk_label_clear_layout (GTK_LABEL (widget));
}
static void
gtk_label_class_init (GtkLabelClass *class)
{
@ -2294,6 +2301,7 @@ gtk_label_class_init (GtkLabelClass *class)
widget_class->focus = gtk_label_focus;
widget_class->get_request_mode = gtk_label_get_request_mode;
widget_class->measure = gtk_label_measure;
widget_class->direction_changed = gtk_label_direction_changed;
class->move_cursor = gtk_label_move_cursor;
class->copy_clipboard = gtk_label_copy_clipboard;