launcher + status2d: correct spacing to be the same as when not using status2d

This commit is contained in:
bakkeby 2024-07-12 16:28:46 +02:00
parent b4b19e3a4c
commit df75e113a9

View File

@ -5,9 +5,9 @@ width_launcher(Bar *bar, BarArg *a)
int i, x = 0;
for (i = 0; i < LENGTH(launchers); i++) {
x += status2dtextlength(launchers[i].name) + lrpad / 2;
x += status2dtextlength(launchers[i].name) + lrpad;
}
return x ? x + lrpad / 2 : 0;
return x;
}
int
@ -18,7 +18,7 @@ draw_launcher(Bar *bar, BarArg *a)
for (i = 0; i < LENGTH(launchers); i++) {
w = status2dtextlength(launchers[i].name);
drawstatusbar(a, launchers[i].name);
a->x += w + lrpad / 2;
a->x += w + lrpad;
}
return a->x ;
@ -30,7 +30,7 @@ click_launcher(Bar *bar, Arg *arg, BarArg *a)
int i, x = 0;
for (i = 0; i < LENGTH(launchers); i++) {
x += status2dtextlength(launchers[i].name) + lrpad / 2;
x += status2dtextlength(launchers[i].name) + lrpad;
if (a->x < x) {
spawn(&launchers[i].command);
break;