Merge branch 'matthiasc/for-main' into 'main'

Fix a copy-paste error

See merge request GNOME/gtk!7358
This commit is contained in:
Matthias Clasen 2024-06-14 23:18:55 +00:00
commit 2f93eb4a28
4 changed files with 9 additions and 36 deletions

View File

@ -21,7 +21,7 @@ color_equal (const float *color1,
const float *color2)
{
return gdk_rgba_equal (&(GdkRGBA) { color1[0], color1[1], color1[2], color1[3] },
&(GdkRGBA) { color1[0], color1[1], color1[2], color1[3] });
&(GdkRGBA) { color2[0], color2[1], color2[2], color2[3] });
}
static void

View File

@ -849,11 +849,14 @@ gtk_label_update_layout_attributes (GtkLabel *self,
attr->end_index = link->end;
pango_attr_list_insert (attrs, attr);
attr = pango_attr_foreground_alpha_new (CLAMP (link_color->alpha * 65535. + 0.5, 0, 65535));
if (link_color->alpha < 0.999)
{
attr = pango_attr_foreground_alpha_new (CLAMP (link_color->alpha * 65535. + 0.5, 0, 65535));
attr->start_index = link->start;
attr->end_index = link->end;
pango_attr_list_insert (attrs, attr);
attr->start_index = link->start;
attr->end_index = link->end;
pango_attr_list_insert (attrs, attr);
}
pango_attr_list_unref (link_attrs);
}

View File

@ -1,4 +1,3 @@
<data>:21:33-37: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE
<data>:55:26-69:3: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE
<data>:74:26-35: error: GTK_CSS_PARSER_ERROR_SYNTAX
<data>:79:26-40: error: g-io-error-quark 15

View File

@ -604,32 +604,6 @@ run_tests (GtkTextBuffer *buffer)
check_specific_tag (buffer, "end_tag");
}
static const char *book_closed_xpm[] = {
"16 16 6 1",
" c None s None",
". c black",
"X c red",
"o c yellow",
"O c #808080",
"# c white",
" ",
" .. ",
" ..XX. ",
" ..XXXXX. ",
" ..XXXXXXXX. ",
".ooXXXXXXXXX. ",
"..ooXXXXXXXXX. ",
".X.ooXXXXXXXXX. ",
".XX.ooXXXXXX.. ",
" .XX.ooXXX..#O ",
" .XX.oo..##OO. ",
" .XX..##OO.. ",
" .X.#OO.. ",
" ..O.. ",
" .. ",
" "};
static void
fill_buffer (GtkTextBuffer *buffer)
{
@ -638,7 +612,6 @@ fill_buffer (GtkTextBuffer *buffer)
GdkRGBA color2;
GtkTextIter iter;
GtkTextIter iter2;
GdkPixbuf *pixbuf;
GdkTexture *texture;
int i;
@ -676,8 +649,7 @@ fill_buffer (GtkTextBuffer *buffer)
"font", "-*-courier-bold-r-*-*-10-*-*-*-*-*-*-*",
NULL);
pixbuf = gdk_pixbuf_new_from_xpm_data (book_closed_xpm);
texture = gdk_texture_new_for_pixbuf (pixbuf);
texture = gdk_texture_new_from_resource ("/org/gtk/libgtk/icons/16x16/actions/audio-volume-high.png");
g_assert_nonnull (texture);
@ -789,7 +761,6 @@ fill_buffer (GtkTextBuffer *buffer)
gtk_text_buffer_apply_tag (buffer, tag, &iter, &iter2);
g_object_unref (pixbuf);
g_object_unref (texture);
}