mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-12 20:00:09 +00:00
Merge branch 'matthiasc/for-main' into 'main'
Fix a copy-paste error See merge request GNOME/gtk!7358
This commit is contained in:
commit
2f93eb4a28
@ -21,7 +21,7 @@ color_equal (const float *color1,
|
|||||||
const float *color2)
|
const float *color2)
|
||||||
{
|
{
|
||||||
return gdk_rgba_equal (&(GdkRGBA) { color1[0], color1[1], color1[2], color1[3] },
|
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
|
static void
|
||||||
|
@ -849,11 +849,14 @@ gtk_label_update_layout_attributes (GtkLabel *self,
|
|||||||
attr->end_index = link->end;
|
attr->end_index = link->end;
|
||||||
pango_attr_list_insert (attrs, attr);
|
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->start_index = link->start;
|
||||||
attr->end_index = link->end;
|
attr->end_index = link->end;
|
||||||
pango_attr_list_insert (attrs, attr);
|
pango_attr_list_insert (attrs, attr);
|
||||||
|
}
|
||||||
|
|
||||||
pango_attr_list_unref (link_attrs);
|
pango_attr_list_unref (link_attrs);
|
||||||
}
|
}
|
||||||
|
@ -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>:55:26-69:3: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE
|
||||||
<data>:74:26-35: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
<data>:74:26-35: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||||
<data>:79:26-40: error: g-io-error-quark 15
|
<data>:79:26-40: error: g-io-error-quark 15
|
||||||
|
@ -604,32 +604,6 @@ run_tests (GtkTextBuffer *buffer)
|
|||||||
check_specific_tag (buffer, "end_tag");
|
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
|
static void
|
||||||
fill_buffer (GtkTextBuffer *buffer)
|
fill_buffer (GtkTextBuffer *buffer)
|
||||||
{
|
{
|
||||||
@ -638,7 +612,6 @@ fill_buffer (GtkTextBuffer *buffer)
|
|||||||
GdkRGBA color2;
|
GdkRGBA color2;
|
||||||
GtkTextIter iter;
|
GtkTextIter iter;
|
||||||
GtkTextIter iter2;
|
GtkTextIter iter2;
|
||||||
GdkPixbuf *pixbuf;
|
|
||||||
GdkTexture *texture;
|
GdkTexture *texture;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -676,8 +649,7 @@ fill_buffer (GtkTextBuffer *buffer)
|
|||||||
"font", "-*-courier-bold-r-*-*-10-*-*-*-*-*-*-*",
|
"font", "-*-courier-bold-r-*-*-10-*-*-*-*-*-*-*",
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
pixbuf = gdk_pixbuf_new_from_xpm_data (book_closed_xpm);
|
texture = gdk_texture_new_from_resource ("/org/gtk/libgtk/icons/16x16/actions/audio-volume-high.png");
|
||||||
texture = gdk_texture_new_for_pixbuf (pixbuf);
|
|
||||||
|
|
||||||
g_assert_nonnull (texture);
|
g_assert_nonnull (texture);
|
||||||
|
|
||||||
@ -789,7 +761,6 @@ fill_buffer (GtkTextBuffer *buffer)
|
|||||||
|
|
||||||
gtk_text_buffer_apply_tag (buffer, tag, &iter, &iter2);
|
gtk_text_buffer_apply_tag (buffer, tag, &iter, &iter2);
|
||||||
|
|
||||||
g_object_unref (pixbuf);
|
|
||||||
g_object_unref (texture);
|
g_object_unref (texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user