You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LR-VIEW-HISTOGRAM: the histogram's clipping buttons read in every theme - #3331
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.
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)
Existing edits and libraries: unchanged; only the colors of two UI buttons change, no setting, edit or rendering.
Shared numbers taken: none.
Where it came from: not applicable.
New dependencies, unsafe, build scripts, network access, spawned processes, deleted files, CI or xtask gate changes: none.
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.
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.
The theme-aware clipping-button change has no established merge-blocking risk.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
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 checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
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
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_colorsincrates/ui-egui/src/panels/edit/histogram.rspicks the tile and the chevron from the theme's tokens instead of a hard-coded gray: the tile ishoverat rest andpressedwhile hovered or active, and the chevron istextwhen clipping shows or the button is active,text_dimotherwise (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.mdand 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 cipasses on this branch, rebased on currentmain(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 fornative_menu.rsapplied uncommitted and reverted before the commit: all 8 steps passed)the_clipping_chevron_stands_3_to_1_against_its_tile_in_every_themechecks all four themes throughTokens::for_kind. With the old gray-60 tile andtext_dimrule 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--memorydemo library,view.appearancelight and dark through the control channel, windowedui.screenshot; main against this branch)Review: fresh reviewer at bd00b6a
Screenshots
Before (
main), Silver:After, Silver:
Before (
main), Charcoal:After, Charcoal:
Merging
histogram.rs(font sizes of the SDR/HDR labels and the exposure line); a test merge of this branch with LR-PREF-INTERFACE: what the interface writes stands 4.5:1 in every theme (stacked on #2898) #2899 and LR-PREF-INTERFACE: marks and words over a picture are in one light ink on a shade (stacked on #2899) #2900 reports no conflicting file.unsafe, build scripts, network access, spawned processes, deleted files, CI orxtaskgate changes: none.Checklist
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)tr()and has its key incrates/ui-egui/locales/*.json; a new shortcut is free indocs/library-shortcuts.md(no new text)docs/parity-checklist.mdand its entry indocs/gaps.mdare updated, honestly (🟡 when it is partial), in the same commitassets/ATTRIBUTION.md; no font or media files addedSummary by CodeRabbit