1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 21:08:08 +01:00

Remove dead code ifdef'ed by GRADIENT_CLIP_ARROW

GRADIENT_CLIP_ARROW was never defined anywhere and having fancier clip
arrows is not something particularly interesting, so let's simply remove
the code.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This commit is contained in:
Carlos R. Mafra
2012-02-11 19:03:43 +00:00
parent 8d7c725b7b
commit 393a917a4f
3 changed files with 1 additions and 55 deletions

View File

@@ -2520,30 +2520,8 @@ static int setClipTitleColor(WScreen * scr, WDefaultEntry * entry, XColor * colo
{
if (scr->clip_title_color[widx])
WMReleaseColor(scr->clip_title_color[widx]);
scr->clip_title_color[widx] = WMCreateRGBColor(scr->wmscreen, color->red, color->green, color->blue, True);
#ifdef GRADIENT_CLIP_ARROW
if (widx == CLIP_NORMAL) {
RImage *image;
RColor color1, color2;
int pt = CLIP_BUTTON_SIZE * wPreferences.icon_size / 64;
int as = pt - 15; /* 15 = 5+5+5 */
FREE_PIXMAP(scr->clip_arrow_gradient);
color1.red = (color->red >> 8) * 6 / 10;
color1.green = (color->green >> 8) * 6 / 10;
color1.blue = (color->blue >> 8) * 6 / 10;
color2.red = WMIN((color->red >> 8) * 20 / 10, 255);
color2.green = WMIN((color->green >> 8) * 20 / 10, 255);
color2.blue = WMIN((color->blue >> 8) * 20 / 10, 255);
image = RRenderGradient(as + 1, as + 1, &color1, &color2, RDiagonalGradient);
RConvertImage(scr->rcontext, image, &scr->clip_arrow_gradient);
RReleaseImage(image);
}
#endif /* GRADIENT_CLIP_ARROW */
wFreeColor(scr, color->pixel);
return REFRESH_ICON_TITLE_COLOR;

View File

@@ -305,14 +305,7 @@ static void paintClipButtons(WAppIcon * clipIcon, Bool lpushed, Bool rpushed)
int as = pt - 15; /* 15 = 5+5+5 */
GC gc = scr->draw_gc; /* maybe use WMColorGC() instead here? */
WMColor *color;
#ifdef GRADIENT_CLIP_ARROW
Bool collapsed = clipIcon->dock->collapsed;
#endif
/*if (!clipIcon->dock->collapsed)
color = scr->clip_title_color[CLIP_NORMAL];
else
color = scr->clip_title_color[CLIP_COLLAPSED]; */
color = scr->clip_title_color[CLIP_NORMAL];
XSetForeground(dpy, gc, WMColorPixel(color));
@@ -337,14 +330,6 @@ static void paintClipButtons(WAppIcon * clipIcon, Bool lpushed, Bool rpushed)
XFillPolygon(dpy, win, scr->draw_gc, p, 3, Convex, CoordModeOrigin);
XSetForeground(dpy, scr->draw_gc, scr->black_pixel);
}
#ifdef GRADIENT_CLIP_ARROW
if (!collapsed) {
XSetFillStyle(dpy, scr->copy_gc, FillTiled);
XSetTile(dpy, scr->copy_gc, scr->clip_arrow_gradient);
XSetClipMask(dpy, scr->copy_gc, None);
gc = scr->copy_gc;
}
#endif /* GRADIENT_CLIP_ARROW */
/* top right arrow */
p[0].x = p[3].x = ICON_SIZE - 5 - as;
@@ -357,10 +342,6 @@ static void paintClipButtons(WAppIcon * clipIcon, Bool lpushed, Bool rpushed)
XFillPolygon(dpy, win, scr->draw_gc, p, 3, Convex, CoordModeOrigin);
XDrawLines(dpy, win, scr->draw_gc, p, 4, CoordModeOrigin);
} else {
#ifdef GRADIENT_CLIP_ARROW
if (!collapsed)
XSetTSOrigin(dpy, gc, ICON_SIZE - 6 - as, 5);
#endif
XFillPolygon(dpy, win, gc, p, 3, Convex, CoordModeOrigin);
XDrawLines(dpy, win, gc, p, 4, CoordModeOrigin);
}
@@ -376,17 +357,9 @@ static void paintClipButtons(WAppIcon * clipIcon, Bool lpushed, Bool rpushed)
XFillPolygon(dpy, win, scr->draw_gc, p, 3, Convex, CoordModeOrigin);
XDrawLines(dpy, win, scr->draw_gc, p, 4, CoordModeOrigin);
} else {
#ifdef GRADIENT_CLIP_ARROW
if (!collapsed)
XSetTSOrigin(dpy, gc, 5, ICON_SIZE - 6 - as);
#endif
XFillPolygon(dpy, win, gc, p, 3, Convex, CoordModeOrigin);
XDrawLines(dpy, win, gc, p, 4, CoordModeOrigin);
}
#ifdef GRADIENT_CLIP_ARROW
if (!collapsed)
XSetFillStyle(dpy, scr->copy_gc, FillSolid);
#endif
}
RImage *wClipMakeTile(WScreen * scr, RImage * normalTile)

View File

@@ -223,11 +223,6 @@ typedef struct _WScreen {
Window clip_balloon; /* window for workspace name */
int keymove_tick;
#ifdef GRADIENT_CLIP_ARROW
Pixmap clip_arrow_gradient;
#endif
struct RContext *rcontext; /* wrlib context */
WMScreen *wmscreen; /* for widget library */