Re: GtkLabel foreground color
- From: Stefan Salewski <mail ssalewski de>
- To: Wiky <wiiiky yeah net>
- Cc: gtk-list gnome org
- Subject: Re: GtkLabel foreground color
- Date: Sun, 02 Mar 2014 23:17:11 +0100
On Sun, 2014-03-02 at 11:55 +0800, Wiky wrote:
I try to change the GtkLabel foreground color using following code:
PangoAttrList *attrList = pango_attr_list_new();
pango_attr_list_insert(attrList,
pango_attr_foreground_new(255, 0, 0));
pango_attr_list_insert(attrList,
pango_attr_weight_new(PANGO_WEIGHT_BOLD));
gtk_label_set_attributes(GTK_LABEL(titleLabel), attrList);
pango_attr_list_unref(attrList);
But the foreground color is chagned to BLACK not RED.
What's wrong with my code?
_______________________________________________
See documentation, i.e.
https://developer.gnome.org/pango/stable/pango-Text-Attributes.html#pango-attr-foreground-new
the red value (ranging from 0 to 65535)
Your 255 is a very dark red.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]