fix for weird graphical bug

This commit is contained in:
speediegq 2022-10-28 20:32:28 +02:00
parent 2033b819a5
commit 89c955de3b
3 changed files with 8 additions and 8 deletions

View file

@ -10,7 +10,7 @@
!@ !@
!! Bar options !! Bar options
!@ !@
- speedwm.bar.height: 8 ! Height of the bar in pixels (<num>) - speedwm.bar.height: 4 ! Height of the bar in pixels (<num>)
- speedwm.bar.position: 1 ! Position of the bar (0: Bottom, 1: Top) - speedwm.bar.position: 1 ! Position of the bar (0: Bottom, 1: Top)
- speedwm.bar.paddingh: 10 ! Horizontal padding (extra space) around the bar in pixels (<num>) - speedwm.bar.paddingh: 10 ! Horizontal padding (extra space) around the bar in pixels (<num>)
- speedwm.bar.paddingv: 10 ! Vertical padding (extra space) around the bar in pixels (<num>) - speedwm.bar.paddingv: 10 ! Vertical padding (extra space) around the bar in pixels (<num>)

View file

@ -200,7 +200,7 @@ rm -f /tmp/itest
rm -f /tmp/wstatus rm -f /tmp/wstatus
rm -f /tmp/iscelsius rm -f /tmp/iscelsius
mkdir -p $HOME/.config/speedwm/status mkdir -p $HOME/.config/speedwm
printf "Loaded $0 $VER\n---\n" printf "Loaded $0 $VER\n---\n"

View file

@ -1328,7 +1328,7 @@ buttonpress(XEvent *e)
} while (c && ev->x > x && (c = c->next)); } while (c && ev->x > x && (c = c->next));
if (selmon->hidetagpowerline || selmon->hidetitlepowerline) if (selmon->hidetagpowerline || selmon->hidetitlepowerline)
click = ClkWinTitle; click = ClkWinTitle;
arg.v = c; arg.v = c;
} }
@ -2481,7 +2481,7 @@ resizebarwin(m);
} }
/* pl title */ /* pl title */
if (!selmon->hidetitlepowerline) if (!selmon->hidetitlepowerline && selmon->colorselectedtitle)
tabw -= 2 * plt; tabw -= 2 * plt;
else if (selmon->hidetagpowerline) { else if (selmon->hidetagpowerline) {
plt = 0; plt = 0;
@ -2542,7 +2542,7 @@ resizebarwin(m);
int pltitle = 0; int pltitle = 0;
if (!selmon->hidetitlepowerline) if (!selmon->hidetitlepowerline && selmon->colorselectedtitle)
pltitle = plt; pltitle = plt;
/* draw title and icon */ /* draw title and icon */
@ -2553,7 +2553,7 @@ resizebarwin(m);
#if USEWINICON #if USEWINICON
} else { } else {
drw_text(drw, x + pltitle, 0, tabw, bh, lrpad / 2 + (c->icon ? c->icw + iconspacing : 0), c->name, 0); /* draw, with icon spacing and width added */ drw_text(drw, x + pltitle, 0, tabw, bh, lrpad / 2 + (c->icon ? c->icw + iconspacing : 0), c->name, 0); /* draw, with icon spacing and width added */
if (c->icon && !selmon->hidetitlepowerline) if (c->icon && !selmon->hidetitlepowerline && selmon->colorselectedtitle)
drw_pic(drw, x + pltitle + lrpad / 2, (bh - c->ich) / 2, c->icw, c->ich, c->icon); /* draw icon */ drw_pic(drw, x + pltitle + lrpad / 2, (bh - c->ich) / 2, c->icw, c->ich, c->icon); /* draw icon */
else if (c->icon) else if (c->icon)
drw_pic(drw, x + lrpad / 2, (bh - c->ich) / 2, c->icw, c->ich, c->icon); /* draw icon */ drw_pic(drw, x + lrpad / 2, (bh - c->ich) / 2, c->icw, c->ich, c->icon); /* draw icon */
@ -2570,7 +2570,7 @@ resizebarwin(m);
drw_rect(drw, x + boxs, boxs, boxw, boxw, c->isfixed, 0); drw_rect(drw, x + boxs, boxs, boxw, boxw, c->isfixed, 0);
} }
if (!selmon->hidetitlepowerline) { if (!selmon->hidetitlepowerline && selmon->colorselectedtitle) {
drw_settrans(drw, c == m->sel ? scheme[SchemeTitleSel] : scheme[scm], scheme[SchemeBar]); drw_settrans(drw, c == m->sel ? scheme[SchemeTitleSel] : scheme[scm], scheme[SchemeBar]);
/* Slash shaped */ /* Slash shaped */
@ -2588,7 +2588,7 @@ resizebarwin(m);
x += tabw; x += tabw;
/* extra width for title */ /* extra width for title */
if (!selmon->hidetitlepowerline) if (!selmon->hidetitlepowerline && selmon->colorselectedtitle)
x += 2 * plt; x += 2 * plt;
} }
} else { } else {