Sit library watermark at photo corner; white icons distinct from amber text

This commit is contained in:
2026-09-08 12:12:47 +07:00
parent 58335d8cd1
commit d2d62c6612
2 changed files with 13 additions and 6 deletions
+9 -4
View File
@@ -528,8 +528,13 @@ export default function Viewfinder({
mode === 'library' && imageFitRect
? imageFitRect
: { dx: 0, dy: 0, dw: vw, dh: vh };
const iconSize = Math.round(vw * 0.032); // matches customFont/iconFont size
const padBottom =
selectedFrame === 'polaroid' ? area.dh * 0.18 + 24 : Math.min(150, area.dh * 0.2);
selectedFrame === 'polaroid'
? area.dh * 0.18 + 24 // polaroid deck below the photo
: mode === 'camera'
? Math.min(150, area.dh * 0.2) // keep clear of the bottom shutter deck
: Math.round(iconSize * 1.5); // library: sit at the photo corner
const yOffset =
mode === 'library'
? Math.min(area.dy + area.dh - padBottom, vh - 190) // never under the deck
@@ -537,16 +542,16 @@ export default function Viewfinder({
const xOffset =
area.dx + (selectedFrame === 'polaroid' ? area.dw * 0.08 : Math.min(16, area.dw * 0.04));
// One clear space (0.6em ≈ a mono space) between each icon and its text.
const iconSize = Math.round(vw * 0.032); // matches customFont/iconFont size
const gap = (w: number) => Math.round(Math.max(w, iconSize) + iconSize * 0.6);
const pinW = iconFont.measureText('📍');
const camW = iconFont.measureText('📷');
return (
<Group>
<SkiaText x={xOffset} y={yOffset - 16} text="📍" font={iconFont} color="#f59e0b" />
{/* Icons white so they read as glyphs, not part of the amber text */}
<SkiaText x={xOffset} y={yOffset - 16} text="📍" font={iconFont} color="#ffffff" />
<SkiaText x={xOffset + gap(pinW.width)} y={yOffset - 16} text={locationName} font={customFont} color="#f59e0b" />
<SkiaText x={xOffset} y={yOffset} text="📷" font={iconFont} color="#f59e0b" />
<SkiaText x={xOffset} y={yOffset} text="📷" font={iconFont} color="#ffffff" />
<SkiaText x={xOffset + gap(camW.width)} y={yOffset} text={timestampStr} font={customFont} color="#f59e0b" />
</Group>
);