mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-15 23:00:08 +00:00
Merge branch 'matthiasc/for-main' into 'main'
textview: Fix a regression in selection drawing Closes #6931 See merge request GNOME/gtk!7620
This commit is contained in:
commit
3f36ebc6e7
@ -4166,6 +4166,7 @@ gtk_text_layout_snapshot (GtkTextLayout *layout,
|
||||
if (have_selection)
|
||||
{
|
||||
GtkCssNode *selection_node;
|
||||
GdkColor text_color;
|
||||
|
||||
selection_start_line = gtk_text_iter_get_line (&selection_start);
|
||||
selection_end_line = gtk_text_iter_get_line (&selection_end);
|
||||
@ -4175,8 +4176,9 @@ gtk_text_layout_snapshot (GtkTextLayout *layout,
|
||||
|
||||
gtk_css_color_to_color (gtk_css_color_value_get_color (style->used->background_color),
|
||||
&selection_color);
|
||||
gtk_css_color_to_color (gtk_css_color_value_get_color (style->used->color), &text_color);
|
||||
|
||||
draw_selection_text = !gdk_color_is_clear (&crenderer->fg_color);
|
||||
draw_selection_text = !gdk_color_is_clear (&text_color);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -10409,8 +10409,14 @@ gtk_widget_compute_transform (GtkWidget *widget,
|
||||
for (iter = widget; iter != ancestor; iter = iter->priv->parent)
|
||||
{
|
||||
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (iter);
|
||||
gsk_transform_to_matrix (priv->transform, &tmp);
|
||||
|
||||
if (GTK_IS_NATIVE (iter))
|
||||
{
|
||||
graphene_matrix_init_identity (out_transform);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gsk_transform_to_matrix (priv->transform, &tmp);
|
||||
graphene_matrix_multiply (&transform, &tmp, &transform);
|
||||
}
|
||||
|
||||
@ -10427,6 +10433,12 @@ gtk_widget_compute_transform (GtkWidget *widget,
|
||||
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (iter);
|
||||
gsk_transform_to_matrix (priv->transform, &tmp);
|
||||
|
||||
if (GTK_IS_NATIVE (iter))
|
||||
{
|
||||
graphene_matrix_init_identity (out_transform);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
graphene_matrix_multiply (&inverse, &tmp, &inverse);
|
||||
}
|
||||
if (!graphene_matrix_inverse (&inverse, &inverse))
|
||||
|
Loading…
Reference in New Issue
Block a user