Skip to content

LR-EXP-WATERMARK: separate horizontal and vertical watermark insets (#827, stacked on #833) - #845

Merged
bflatastic merged 3 commits into
storytold:mainfrom
john01px2022:john01px2022/watermark-inset-xy
Oct 11, 2026
Merged

bflatastic merged 3 commits into
storytold:mainfrom
john01px2022:john01px2022/watermark-inset-xy

Conversation

@john01px2022

@john01px2022 john01px2022 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Part of #827. Stacked on #833: the first two commits are #833 unchanged. Review only the last commit.

#833 shows all nine positions and one inset slider. Lightroom Classic's watermark editor has separate horizontal and vertical insets, so this commit splits the single margin in two.

What changed

  • Watermark.inset becomes inset_x (margin from the left or right edge) and inset_y (from the top or bottom edge). Both are still a fraction of the short edge, 0..0.4, default 0.025, so equal values give equal gaps. Text and graphic watermarks both use them.
  • New watermark keys insetX and insetY. The old inset key is still accepted and sets both, so saved presets, Export with Previous and existing MCP calls keep working. If both are given, insetX / insetY win. Saved settings now write only the two new keys.
  • The Export dialog replaces fix(export): expose all nine watermark positions and adjustable inset #833's Inset slider with Horizontal inset and Vertical inset. A slider is greyed out when the position is centred along its axis (horizontal for Top, Center and Bottom; vertical for Left, Center and Right), because that margin has no effect there. This matches how the engine already places centred watermarks.
  • MCP tool descriptions (tools.rs, headless.rs), docs/parity-checklist.md and docs/vertical-watermarks.md updated. Translations for the two slider labels added in all nine catalogs.
  • cargo fmt reflowed two arrays from fix(export): expose all nine watermark positions and adjustable inset #833 (WM_POSITIONS and its test), because fmt --check in cargo xtask ci fails on them as written.
pr845-insets-bottom-center

Tests

  • watermark_insets_are_horizontal_and_vertical: each margin moves text along its own axis only. An old inset reads as both margins, a new key overrides it, and settings save and load back as the two margins.
  • graphic_watermark_is_placed_scaled_and_blended: now also checks a graphic placed with different horizontal and vertical margins.
  • watermark_params_are_validated: range errors for insetX / insetY, and the key list in error messages.
  • I took a headless snapshot of the dialog with a bottom-centre watermark: the horizontal inset is greyed out, and the vertical inset is active.

CI

cargo xtask ci passes except lightcraft-mcp e2e export_progress_and_cancel, which fails the same way on main on this machine (#674, fix in #668).

Merge order note

This PR (and #847 on top of it) and #843 (watermark preview) both edit the watermark tests and the LR-EXP-WATERMARK row. Whichever lands second has a small conflict (keep both sides). I'll rebase whichever is second.

🤖 Generated with Claude Code

Ni-zav and others added 3 commits October 11, 2026 04:47
…torytold#827)

Watermark.inset becomes inset_x (from the left or right edge) and inset_y
(from the top or bottom edge), like Lightroom Classic's watermark editor.
The watermark keys are insetX and insetY; the old inset key still reads as
both, so saved presets and existing MCP calls keep working.

The Export dialog's Inset slider becomes Horizontal inset and Vertical
inset, each greyed out when the position is centred along its axis.
cargo fmt reflows WM_POSITIONS and its test from the previous commits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants