http://bugzilla.gnome.org/show_bug.cgi?id=124513 merge in patch to
2003-10-24 Jody Goldberg <jody@gnome.org> http://bugzilla.gnome.org/show_bug.cgi?id=124513 * main.c (setup_font_sample) : merge in patch to allocate black and white correctly on TruColor displays.
This commit is contained in:
parent
3c9f4ea6ed
commit
6d257e030e
3 changed files with 20 additions and 2 deletions
|
@ -202,8 +202,8 @@ setup_font_sample (GtkWidget *darea,
|
|||
const char *string1 = "abcfgop AO ";
|
||||
const char *string2 = "abcfgop";
|
||||
|
||||
XftColor black = { 0, { 0, 0, 0, 0xffff } };
|
||||
XftColor white = { 0, { 0xffff, 0xffff, 0xffff, 0xffff } };
|
||||
XftColor black, white;
|
||||
XRenderColor rendcolor;
|
||||
|
||||
Display *xdisplay = gdk_x11_get_default_xdisplay ();
|
||||
|
||||
|
@ -265,6 +265,17 @@ setup_font_sample (GtkWidget *darea,
|
|||
|
||||
draw = XftDrawCreate (xdisplay, GDK_DRAWABLE_XID (pixmap), xvisual, xcolormap);
|
||||
|
||||
rendcolor.red = 0;
|
||||
rendcolor.green = 0;
|
||||
rendcolor.blue = 0;
|
||||
rendcolor.alpha = 0xffff;
|
||||
XftColorAllocValue (xdisplay, xvisual, xcolormap, &rendcolor, &black);
|
||||
|
||||
rendcolor.red = 0xffff;
|
||||
rendcolor.green = 0xffff;
|
||||
rendcolor.blue = 0xffff;
|
||||
rendcolor.alpha = 0xffff;
|
||||
XftColorAllocValue (xdisplay, xvisual, xcolormap, &rendcolor, &white);
|
||||
XftDrawRect (draw, &white, 0, 0, width, height);
|
||||
if (font1)
|
||||
XftDrawStringUtf8 (draw, &black, font1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue