Jelajahi Sumber

Xlib: remove text BG rectangle

It's already window or BGcolor on background.
Dmitry Hrabrov 8 tahun lalu
induk
melakukan
708a7ebbc3
1 mengubah file dengan 1 tambahan dan 5 penghapusan
  1. 1 5
      demo/x11/nuklear_xlib.h

+ 1 - 5
demo/x11/nuklear_xlib.h

@@ -389,12 +389,8 @@ nk_xsurf_draw_text(XSurface *surf, short x, short y, unsigned short w, unsigned
     const char *text, int len, XFont *font, struct nk_color cbg, struct nk_color cfg)
 {
     int tx, ty;
-    unsigned long bg = nk_color_from_byte(&cbg.r);
     unsigned long fg = nk_color_from_byte(&cfg.r);
-
-    XSetForeground(surf->dpy, surf->gc, bg);
-    XFillRectangle(surf->dpy, surf->drawable, surf->gc, (int)x, (int)y, (unsigned)w, (unsigned)h);
-    if(!text || !font || !len) return;
+    (void)cbg;
 
     tx = (int)x;
     ty = (int)y + font->ascent;