Repository navigation
fix(ui): start Ink from the colours shown under a legend, colorbar, table or chart - #3136
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewBugs
Security
Performance
Quality
AGENTS.md
Checked for twins: Other notes
Change sizeCompared with the base branch (merge base 0f4d10e, PR head a510472), the whole PR.
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the |
Summary
Turning on Ink for a legend, colorbar, table or chart picked its starting colour from the element's own background and the page only, so over another element it could be unreadable: white text over a white rectangle on a dark page, or dark grey over a dark rectangle on a white one.
The starting colour now reads what is shown at the centre of the element's box, in drawing order:
Maps, pictures, text and lines have no single fill to read and are skipped, as before. One point is read, not the whole box. A table's own white cells and a north arrow's shapes aren't read either: text over them runs into their content whatever its ink. Only the first colour is affected: the swatch changes it, and a command giving
coloris unchanged.Reach: the Ink checkbox of the Format pane, so the desktop and browser apps. The command line, Python, the Assistant and MCP give
colorthemselves; the phone interface (ui-touch) doesn't show the Format pane.Testing
layoutview/tests.rs: fills under, hidden or over the element, one short of the centre, opacity and order, an ellipse's shape, a background's padding, a turned text, a map and a picture. The two that expect a new result failed with the previous rule.cargo fmt --check, clippy,cargo nextest(10089 passed, 29 skipped), doctests,cargo xtask layersandschema --check. On the last commit:cargo nextest run -p rustgis-ui-egui -E 'test(ink_)', clippy ofrustgis-ui-eguiwith warnings as errors,cargo fmt --check.ui_shotbefore and after: a legend over a white rectangle on a dark page, then Ink turned on.UI evidence
Before (left) and after (right), with Ink just turned on:
Related issue
Closes #2953.
Summary by CodeRabbit