mirror of https://github.com/0intro/wmii
Get rid of 3d border affect of frames
This commit is contained in:
parent
ed5ff78e79
commit
7c06252261
1
bar.c
1
bar.c
|
@ -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
14
draw.c
|
@ -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
|
||||
|
|
1
frame.c
1
frame.c
|
@ -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
2
main.c
|
@ -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);
|
||||
|
|
|
@ -50,7 +50,7 @@ focuscolors $WMII_FOCUSCOLORS
|
|||
selcolors $WMII_SELCOLORS
|
||||
normcolors $WMII_NORMCOLORS
|
||||
grabmod $MODKEY
|
||||
border 2
|
||||
border 1
|
||||
EOF
|
||||
|
||||
# COLUMN RULES
|
||||
|
|
Loading…
Reference in New Issue