mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-24 11:15:51 +01: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:
@@ -1296,7 +1296,7 @@ paintListItem(WMList *lPtr, int index, Drawable d, char *text, int state,
|
||||
WMScreen *scr = WMWidgetScreen(lPtr);
|
||||
int width, height, x, y;
|
||||
Display *dpy = WMScreenDisplay(scr);
|
||||
WMColor *white = WMWhiteColor(scr);
|
||||
WMColor *back = (state & WLDSSelected) ? WMWhiteColor(scr) : WMGrayColor(scr);
|
||||
WMListItem *item;
|
||||
WMColor *black = WMBlackColor(scr);
|
||||
TextureListItem *titem;
|
||||
@@ -1304,7 +1304,7 @@ paintListItem(WMList *lPtr, int index, Drawable d, char *text, int state,
|
||||
item = WMGetListItem(lPtr, index);
|
||||
titem = (TextureListItem*)item->clientData;
|
||||
if (!titem) {
|
||||
WMReleaseColor(white);
|
||||
WMReleaseColor(back);
|
||||
WMReleaseColor(black);
|
||||
return;
|
||||
}
|
||||
@@ -1314,11 +1314,7 @@ paintListItem(WMList *lPtr, int index, Drawable d, char *text, int state,
|
||||
x = rect->pos.x;
|
||||
y = rect->pos.y;
|
||||
|
||||
if (state & WLDSSelected)
|
||||
XFillRectangle(dpy, d, WMColorGC(white), x, y, width, height);
|
||||
else
|
||||
XClearArea(dpy, d, x, y, width, height, False);
|
||||
|
||||
XFillRectangle(dpy, d, WMColorGC(back), x, y, width, height);
|
||||
|
||||
if (titem->preview)
|
||||
XCopyArea(dpy, titem->preview, d, WMColorGC(black), 0, 0,
|
||||
@@ -1338,7 +1334,7 @@ paintListItem(WMList *lPtr, int index, Drawable d, char *text, int state,
|
||||
strlen(titem->texture));
|
||||
|
||||
|
||||
WMReleaseColor(white);
|
||||
WMReleaseColor(back);
|
||||
WMReleaseColor(black);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user