changeset: 1802:babeee0ac1eb
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Fri Feb 09 01:01:54 2007 -0500
summary: Get rid of 3d border affect of frames
diff -r 409216e7556e -r babeee0ac1eb bar.c
--- a/bar.c Fri Feb 09 00:27:03 2007 -0500
+++ b/bar.c Fri Feb 09 01:01:54 2007 -0500
@@ -66,6 +66,7 @@ draw_bar(WMScreen *s) {
float shrink;
Bar *b, *tb, *largest, **pb;
+ s->bbrush.border = def.border;
draw_tile(&s->bbrush);
if(!s->lbar && !s->rbar)
goto MapBar;
diff -r 409216e7556e -r babeee0ac1eb draw.c
--- a/draw.c Fri Feb 09 00:27:03 2007 -0500
+++ b/draw.c Fri Feb 09 01:01:54 2007 -0500
@@ -81,7 +81,7 @@ void
void
draw_border(BlitzBrush *b) {
drawbg(b->blitz->dpy, b->drawable, b->gc, &b->rect,
- b->color, False, True);
+ b->color, False, b->border);
}
void
@@ -146,17 +146,17 @@ draw_label(BlitzBrush *b, char *text) {
void
drawbg(Display *dpy, Drawable drawable, GC gc, XRectangle *rect,
- BlitzColor c, Bool fill, Bool border)
+ BlitzColor c, Bool fill, int border)
{
if(fill) {
XSetForeground(dpy, gc, c.bg);
XFillRectangles(dpy, drawable, gc, rect, 1);
}
- if(!border)
- return;
- XSetLineAttributes(dpy, gc, 0, LineSolid, CapButt, JoinMiter);
- XSetForeground(dpy, gc, c.border);
- XDrawRectangle(dpy, drawable, gc, rect->x, rect->y, rect->width - 1, rect->height - 1);
+ if(border) {
+ XSetLineAttributes(dpy, gc, border, LineSolid, CapButt, JoinMiter);
+ XSetForeground(dpy, gc, c.border);
+ XDrawRectangle(dpy, drawable, gc, rect->x, rect->y, rect->width - 1, rect->height - 1);
+ }
}
void
diff -r 409216e7556e -r babeee0ac1eb frame.c
--- a/frame.c Fri Feb 09 00:27:03 2007 -0500
+++ b/frame.c Fri Feb 09 01:01:54 2007 -0500
@@ -170,6 +170,7 @@ void
void
draw_frame(Frame *f) {
if(def.border) {
+ f->tile.border = def.border;
f->tile.rect = f->rect;
f->tile.rect.x = f->tile.rect.y = 0;
}
diff -r 409216e7556e -r babeee0ac1eb main.c
--- a/main.c Fri Feb 09 00:27:03 2007 -0500
+++ b/main.c Fri Feb 09 01:01:54 2007 -0500
@@ -300,7 +300,7 @@ main(int argc, char *argv[]) {
def.keys = nil;
def.keyssz = 0;
def.font.fontstr = ixp_estrdup(BLITZ_FONT);
- def.border = 2;
+ def.border = 1;
def.colmode = Coldefault;
strncpy(def.selcolor.colstr, BLITZ_SELCOLORS, sizeof(def.selcolor.colstr));
loadcolor(&blz, &def.selcolor);
diff -r 409216e7556e -r babeee0ac1eb rc/wmiirc
--- a/rc/wmiirc Fri Feb 09 00:27:03 2007 -0500
+++ b/rc/wmiirc Fri Feb 09 01:01:54 2007 -0500
@@ -50,7 +50,7 @@ selcolors $WMII_SELCOLORS
selcolors $WMII_SELCOLORS
normcolors $WMII_NORMCOLORS
grabmod $MODKEY
-border 2
+border 1
EOF
# COLUMN RULES
diff -r 409216e7556e -r babeee0ac1eb wmii.h
--- a/wmii.h Fri Feb 09 00:27:03 2007 -0500
+++ b/wmii.h Fri Feb 09 01:01:54 2007 -0500
@@ -61,7 +61,7 @@ struct BlitzBrush {
Blitz *blitz;
Drawable drawable;
GC gc;
- Bool border;
+ int border;
BlitzColor color;
BlitzAlign align;
BlitzFont *font;
Received on Fri Feb 09 2007 - 07:05:43 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:03 UTC