mirror of
https://github.com/kbenestad/reimburse.git
synced 2026-06-18 08:04:31 +00:00
Fix item separator line position; item name bold all-caps
- Accent separator line moved to y+lh (one line-height above text baseline) so it sits cleanly above the ITEM/PROJECT/TRAVEL label instead of cutting through it - Item name rendered bold and uppercased
This commit is contained in:
parent
92760dffca
commit
f1d1ae71ee
1 changed files with 2 additions and 2 deletions
|
|
@ -955,13 +955,13 @@ async function generatePDF() {
|
|||
state.items.forEach((item, itemIdx) => {
|
||||
// Item header
|
||||
needSpace(lh * 6); // need room for at least header + one line
|
||||
if (itemIdx > 0) pg.drawLine({start:{x:M.left, y:y+3}, end:{x:M.left+W, y:y+3}, thickness:0.75, color:accent});
|
||||
if (itemIdx > 0) 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});
|
||||
const subStr = `Subtotal: ${baseCur} ${fmtAmt(item._subtotal)}`;
|
||||
const subW = fontBold.widthOfTextAtSize(subStr, sz);
|
||||
pg.drawText(subStr, {x:M.left+W-subW, y, size:sz, font:fontBold, color:accent});
|
||||
y -= lh;
|
||||
pg.drawText(item.name, {x:M.left, y, size:sz, font:fontBody, color:black});
|
||||
pg.drawText((item.name||'').toUpperCase(), {x:M.left, y, size:sz, font:fontBold, color:black});
|
||||
y -= lh + 4;
|
||||
|
||||
// Lines
|
||||
|
|
|
|||
Loading…
Reference in a new issue