1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-04-16 21:23:35 +02:00

- Updated WINGs/NEWS with info about hw the API changed how how things

are affected. Fixes for old code too.
- Double buffering in WMList. All widgets or apps using WMList and
  having user drawing porcedures in place will inherit this double
  buffering automatically too.
- New functions in WINGs: WMGetColorAlpha(), WMIsAAFont()
- Misc code cleanups in WINGs and src/dialog.c
This commit is contained in:
dan
2002-10-16 04:05:45 +00:00
parent 2b2fecac12
commit 1e92274495
23 changed files with 346 additions and 243 deletions

View File

@@ -3422,12 +3422,13 @@ static void
colorListPaintItem(WMList *lPtr, int index, Drawable d, char *text,
int state, WMRect *rect)
{
int width, height, x, y;
RColor color = *((RColor *)WMGetListItem(lPtr, index)->clientData);
WMScreen *scr = WMWidgetScreen(lPtr);
Display *dpy = WMScreenDisplay(scr);
W_ColorPanel *panel = WMGetHangedData(lPtr);
WMColor *fillColor;
WMScreen *scr = WMWidgetScreen(lPtr);
Display *dpy = WMScreenDisplay(scr);
WMView *view = W_VIEW(lPtr);
RColor color = *((RColor *)WMGetListItem(lPtr, index)->clientData);
W_ColorPanel *panel = WMGetHangedData(lPtr);
int width, height, x, y;
WMColor *fillColor;
width = rect->size.width;
height = rect->size.height;
@@ -3435,15 +3436,14 @@ colorListPaintItem(WMList *lPtr, int index, Drawable d, char *text,
y = rect->pos.y;
if (state & WLDSSelected)
WMPaintColorSwatch(scr->white, d, x +15, y, width -15, height);
XFillRectangle(dpy, d, WMColorGC(scr->white), x, y, width, height);
else
XClearArea(dpy, d, x +15, y, width -15, height, False);
XFillRectangle(dpy, d, WMColorGC(view->backColor), x, y, width, height);
fillColor = WMCreateRGBColor(scr, color.red*256, color.green*256,
color.blue*256, False);
fillColor = WMCreateRGBColor(scr, color.red<<8, color.green<<8,
color.blue<<8, True);
WMSetColorInGC(fillColor, WMColorGC(fillColor));
WMPaintColorSwatch(fillColor, d, x, y, 15, 15);
XFillRectangle(dpy, d, WMColorGC(fillColor), x, y, 15, height);
WMReleaseColor(fillColor);
WMDrawString(scr, d, scr->black, panel->font12, x+18, y, text, strlen(text));