mirror of
https://github.com/kbenestad/reimburse.git
synced 2026-06-18 16:04:31 +00:00
Increase gap between items: drop 2×lh before separator line
Previously y -= lh then line at y+lh put the separator exactly at the stripe bottom with no breathing room. Dropping 2×lh leaves one full line height of white space between the stripe and the separator, and another line height between the separator and the item header.
This commit is contained in:
parent
a94a2ed4eb
commit
69d1c35883
1 changed files with 2 additions and 2 deletions
|
|
@ -954,9 +954,9 @@ async function generatePDF() {
|
|||
// Items
|
||||
state.items.forEach((item, itemIdx) => {
|
||||
// Item header
|
||||
needSpace(lh * 7); // need room for separator gap + header + one line
|
||||
needSpace(lh * 8); // need room for separator gap + header + one line
|
||||
if (itemIdx > 0) {
|
||||
y -= lh; // create gap below previous item before drawing separator
|
||||
y -= lh * 2; // full gap below previous item's stripe before separator
|
||||
pg.drawLine({start:{x:M.left, y:y+lh}, end:{x:M.left+W, y:y+lh}, thickness:0.75, color:accent});
|
||||
}
|
||||
pg.drawText('ITEM / PROJECT / TRAVEL', {x:M.left, y, size:sz, font:fontBold, color:accent});
|
||||
|
|
|
|||
Loading…
Reference in a new issue