Don't merge the right powerline with the next item

This commit is contained in:
speedie 2023-07-16 03:46:31 +02:00
parent 0627c2fc1c
commit 15fcdb0ca5
2 changed files with 3 additions and 3 deletions

View file

@ -335,7 +335,7 @@ int drawitem(int x, int y, int w) {
int itemoverride = 1;
for (item = currentitem; item != nextitem; item = item->right) { // draw items
x = drawitemtext(item, x + (powerlineitems ? sp.plw : 0), y, MIN(pango_item ? TEXTWM(item->text) : TEXTW(item->text),
x = drawitemtext(item, x + (powerlineitems ? 2 * sp.plw : 0), y, MIN(pango_item ? TEXTWM(item->text) : TEXTW(item->text),
sp.mw - x -
rarroww -
numberw -

View file

@ -384,13 +384,13 @@ void calcoffsets(void) {
// calculate which items will begin the next page
for (i = 0, nextitem = currentitem; nextitem; nextitem = nextitem->right) {
if ((i += (lines > 0) ? sp.bh : MIN(TEXTWM(nextitem->text) + (powerlineitems ? !lines ? 2 * sp.plw : 0 : 0), offset)) > offset)
if ((i += (lines > 0) ? sp.bh : MIN(TEXTWM(nextitem->text) + (powerlineitems ? !lines ? 3 * sp.plw : 0 : 0), offset)) > offset)
break;
}
// calculate which items will begin the previous page
for (i = 0, previousitem = currentitem; previousitem && previousitem->left; previousitem = previousitem->left) {
if ((i += (lines > 0) ? sp.bh : MIN(TEXTWM(previousitem->left->text) + (powerlineitems ? !lines ? 2 * sp.plw : 0 : 0), offset)) > offset)
if ((i += (lines > 0) ? sp.bh : MIN(TEXTWM(previousitem->left->text) + (powerlineitems ? !lines ? 3 * sp.plw : 0 : 0), offset)) > offset)
break;
}
}