Get rid of 3d border affect of frames

This commit is contained in:
Kris Maglione 2007-02-09 01:01:54 -05:00
parent ed5ff78e79
commit 7c06252261
6 changed files with 12 additions and 10 deletions

1
bar.c
View File

@ -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;

14
draw.c
View File

@ -81,7 +81,7 @@ draw_tile(BlitzBrush *b) {
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

View File

@ -170,6 +170,7 @@ update_frame_widget_colors(Frame *f) {
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;
}

2
main.c
View File

@ -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);

View File

@ -50,7 +50,7 @@ focuscolors $WMII_FOCUSCOLORS
selcolors $WMII_SELCOLORS
normcolors $WMII_NORMCOLORS
grabmod $MODKEY
border 2
border 1
EOF
# COLUMN RULES

2
wmii.h
View File

@ -61,7 +61,7 @@ struct BlitzBrush {
Blitz *blitz;
Drawable drawable;
GC gc;
Bool border;
int border;
BlitzColor color;
BlitzAlign align;
BlitzFont *font;