create_pango_layout(GtkCellRendererText *gtk_renderer,
GtkWidget *widget)
{
- GdkColor *foreground_gdk;
+ GdkRGBA *foreground_rgba;
PangoAttrList *attr_list, *attributes;
PangoLayout *layout;
PangoUnderline uline, underline;
"text", &renderer_text,
"attributes", &attributes,
"foreground-set", &foreground_set,
- "foreground-gdk", &foreground_gdk,
+ "foreground-gdk", &foreground_rgba,
"strikethrough-set", &strikethrough_set,
"strikethrough", &strikethrough,
"font-desc", &font_desc,
if (foreground_set)
{
- add_attr (attr_list, pango_attr_foreground_new (foreground_gdk->red,
- foreground_gdk->green,
- foreground_gdk->blue));
+ add_attr (attr_list, pango_attr_foreground_new (foreground_rgba->red * 65535,
+ foreground_rgba->green * 65535,
+ foreground_rgba->blue * 65535));
}
if (strikethrough_set)
pango_font_description_free (font_desc);
pango_attr_list_unref (attributes);
g_free (renderer_text);
- gdk_color_free (foreground_gdk);
+ gdk_rgba_free (foreground_rgba);
return layout;
}
g_object_get (tag, "foreground-set", &val_set, NULL);
if (val_set)
{
- GdkColor *c;
+ GdkRGBA *rgba;
gchar *value;
- g_object_get (tag, "foreground-gdk", &c, NULL);
- value = g_strdup_printf ("%u,%u,%u", c->red, c->green, c->blue);
- gdk_color_free (c);
+ g_object_get (tag, "foreground-rgba", &rgba, NULL);
+ value = g_strdup_printf ("%u,%u,%u",
+ (guint) rgba->red * 65535,
+ (guint) rgba->green * 65535,
+ (guint) rgba->blue * 65535);
+ gdk_rgba_free (rgba);
attrib_set = gail_misc_add_attribute (attrib_set, ATK_TEXT_ATTR_FG_COLOR, value);
}
temp_tags = temp_tags->next;
g_object_get (tag, "background-set", &val_set, NULL);
if (val_set)
{
- GdkColor *c;
+ GdkRGBA *rgba;
gchar *value;
- g_object_get (tag, "background-gdk", &c, NULL);
- value = g_strdup_printf ("%u,%u,%u", c->red, c->green, c->blue);
- gdk_color_free (c);
+ g_object_get (tag, "background-rgba", &rgba, NULL);
+ value = g_strdup_printf ("%u,%u,%u",
+ (guint) rgba->red * 65535,
+ (guint) rgba->green * 65535,
+ (guint) rgba->blue * 65535);
+ gdk_rgba_free (rgba);
attrib_set = gail_misc_add_attribute (attrib_set, ATK_TEXT_ATTR_BG_COLOR, value);
}
temp_tags = temp_tags->next;