Skip to content

LR-VIEW-HISTOGRAM: the histogram's clipping buttons read in every theme - #3331

Merged
aiongg merged 1 commit into
storytold:mainfrom
nledford:mac-histogram-chevrons
Oct 31, 2026
Merged

aiongg merged 1 commit into
storytold:mainfrom
nledford:mac-histogram-chevrons

Conversation

@nledford

@nledford nledford commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Off main.

Problem

The two buttons at the histogram's top corners (shadow and highlight clipping) were drawn as a fixed dark-gray tile (Color32::from_gray(60)) with a dimmed chevron. In the light themes (Silver, Paper) that is a near-black tile on a light panel, and the dim chevron stands only about 2:1 against it (2.04:1 in Silver, 2.23:1 in Paper), so the mark barely reads and the tiles clash with the panel.

Change

clip_button_colors in crates/ui-egui/src/panels/edit/histogram.rs picks the tile and the chevron from the theme's tokens instead of a hard-coded gray: the tile is hover at rest and pressed while hovered or active, and the chevron is text when clipping shows or the button is active, text_dim otherwise (the same rule as before). In all four themes the chevron now stands at least 3.1:1 on its tile in every state (Silver's dim chevron on a hovered tile is the tightest at 3.10:1), and the tile is a quiet raised fill next to the plot's backdrop. The dark themes look the same as before. docs/whats-new.md and the LR-VIEW-HISTOGRAM row (and its revision entry) are updated.

Not in this PR: a visible hover step as strong as the old near-black-to-light jump in the light themes (the hover tile is one theme step darker, as other raised controls are); the clipping overlay itself; the other text-legibility work in #2899 and #2900, which doesn't touch these buttons.

How it was checked

  • cargo xtask ci passes on this branch, rebased on current main (run locally on this Mac with MENU-BAR: clippy passes on macOS again (Quit, About and Settings share one branch) #2973's one-file clippy fix for native_menu.rs applied uncommitted and reverted before the commit: all 8 steps passed)
  • A test that fails without this change (for a crash fix: a regression test that panicked before it): the_clipping_chevron_stands_3_to_1_against_its_tile_in_every_theme checks all four themes through Tokens::for_kind. With the old gray-60 tile and text_dim rule in the same function shape it fails at the first light state: Silver active=false hovered=false clipped=false: chevron 2.04:1 on its tile
  • User-visible change: ran the app and looked at the result (release build, --memory demo library, view.appearance light and dark through the control channel, windowed ui.screenshot; main against this branch)

Review: fresh reviewer at bd00b6a

Screenshots

Before (main), Silver:

Silver, before

After, Silver:

Silver, after

Before (main), Charcoal:

Charcoal, before

After, Charcoal:

Charcoal, after

Merging

Checklist

  • No new panic path in non-test code: no unwrap / expect / panic!, no indexing or unchecked arithmetic on a number from a file, a person or an agent (get, checked_mul, NaN and char boundaries handled)
  • New text on screen goes through tr() and has its key in crates/ui-egui/locales/*.json; a new shortcut is free in docs/library-shortcuts.md (no new text)
  • The feature's rows in docs/parity-checklist.md and its entry in docs/gaps.md are updated, honestly (🟡 when it is partial), in the same commit
  • New code has a caller: no command, module or setting that nothing reaches yet
  • Every new image, icon or other asset has its entry in assets/ATTRIBUTION.md; no font or media files added
  • Ready to merge (otherwise open it as a draft)

Summary by CodeRabbit

  • Style
    • Updated the histogram’s shadow and highlight clipping buttons to use colors from the active theme, making their appearance consistent across available themes.
    • Improved the buttons’ visual contrast in idle, hovered, and active states.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 77c0a6a and bd00b6a.

Files selected for processing: 3
  • crates/ui-egui/src/panels/edit/histogram.rs
  • docs/parity-checklist.md
  • docs/whats-new.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

Walkthrough

Histogram clipping buttons now use theme-derived tile colors for active, hovered, and idle states. Their chevron colors remain state-based. A test checks contrast across themes, and the documentation records the change.

Changes: Histogram clipping-button theme colors

Layer / File(s) Summary
Clipping-button colors and validation
crates/ui-egui/src/panels/edit/histogram.rs, docs/parity-checklist.md, docs/whats-new.md
A helper selects tile and chevron colors based on clipping-button state. The buttons use the helper, and tests check contrast across themes. The checklist and release notes describe the updated colors.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: aiongg

Merge Risk: Minimal · up to bd00b

The theme-aware clipping-button change has no established merge-blocking risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the histogram clipping buttons and says they read correctly in every theme. The changeset makes the shadow and highlight clipping buttons in histogram.rs use theme tokens, with a raise…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the histogram clipping buttons and says they read correctly in every theme. The changeset makes the shadow and highlight clipping buttons in histogram.rs use theme tokens, with a raised tile fill and a chevron that keeps 3:1 contrast across all four themes. The title matches the main change, and it uses the LR-VIEW-HISTOGRAM tracking prefix. It is slightly informal with "read", but a teammate scanning history would understand the primary change.

Full details: Docstring Coverage

Explanation

Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 1 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Clippy (1.99.0)

Clippy execution timed out

Comment @coderabbitai help to get the list of available commands.

r3d42-git added a commit to r3d42-git/lightcraft that referenced this pull request Oct 30, 2026
…ates

Adopt the accepted upstream UI fixes from storytold#3364, storytold#3331 and storytold#3345.
Translate white-balance popup entries, use theme-aware clipping-button
colours, and distinguish pending thumbnails from failed full or embedded
preview requests. Preserve the R3D spatial clipping overlay and thumbnail
visibility and priority bookkeeping.

Include the upstream contrast, renderer-state and held-thumbnail regressions.
Validation: cargo xtask ci (all eight gates), focused red/green regressions,
isolated headless snapshots and native German/English and four-theme checks.
The user accepted the separate test build before local installation.

Co-Authored-By: Codex <noreply@openai.com>
@aiongg
aiongg merged commit f6b9c3e into storytold:main Oct 31, 2026
6 checks passed
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.

2 participants