Skip to content

workbench: explorer icons read on a float's pane and every material - #672

Merged
foxnne merged 1 commit into
mainfrom
workbench/float-icon-contrast
Oct 19, 2026
Merged

foxnne merged 1 commit into
mainfrom
workbench/float-icon-contrast

Conversation

@foxnne

@foxnne foxnne commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes the maintainer's report: "the file explorer icons are invisible in a popped-out window because the icons are the same color as the background."

What changes

The explorer's folder, file and caret icons now read in a popped-out float, under every window material and theme. A file's glyph is one colour wherever it is shown: the tree, a document tab, and a row or tab carried in glass.

Cause. The cause is not the float's material base (#647, #664). Away from the pointer, a file-tree row's glyph rested in theme.window.fill and lerped toward its accent colour as the pointer neared (files.zig drawRow). Window fill is the theme's darkest colour, and it reads only on the main window's own base: the sidebar measured 65,67,74, with the glyphs at 28,29,36. A float puts the explorer on its pane's card, measured at 38,39,45 on Liquid Glass. That is a few steps from the window fill, so the icons came out the colour under them. The same happens wherever the explorer sits on a card.

Fix. Glyphs now rest in core.widgets.treeGlyphColor(theme), the theme's control.text. That is the colour the tree's labels, a tab's file icon (Workspace) and a carried row's icon (ViewDrag.drawTabFace) already used, and all three now call it, so a picked-up row no longer changes colour. Near the pointer, icons still light up toward their accent as before. It is opaque, so plugin painters that tint with the row colour still get an opaque tint.

One visible change in the main window: resting tree icons go from near-black silhouettes to the label grey.

An earlier revision used control.text at half opacity. Review flagged three problems with it: it handed plugin painters a translucent tint, it gave a carried row a different colour from its resting row, and its test restated the formula. It was dropped for this.

SDK impact

  • None
  • Core-only or additive: core.widgets.treeGlyphColor reaches plugins at the next SDK release (no fingerprint move)

Verified

  • macOS: a quiet sandbox on main (Liquid Glass, Fizzy Dark) with the explorer floated (a float in layout.zon) reproduced the report. The float's card was 38,39,45, its icons 28,29,36, and the main window's tree icons were also 28,29,36 on 65,67,74. The after-capture could not be taken because the display was asleep (screencapture returned black), so the fix is checked by the test below rather than on screen.
  • Test: workbench: a file tree's glyphs stand off the main window's base and a float's pane alike (tests/integration.zig). On the measured float card, the old rest colour is within 15 luma and the new one is more than 60 away. The new one is also more than 40 away from the main window's base. For every dvui built-in theme, the glyph is more than 40 luma off both the window fill and the content fill.
  • Gates: check-fmt, build, test, test-integration, check-web, -Dnative-backend=sdl3, test-sdk-version, check-tests-reached.
  • Windows:
  • Linux:
  • Web:

Follow-ups

None.

🤖 Generated with Claude Code

A file-tree row's glyph away from the pointer rested in the theme's window
fill (Fizzy Dark 28,29,36), lerped toward its accent as the pointer nears.
That reads only on the main window's own base. A popped-out float puts the
explorer on its pane's card (38,39,45 measured on Liquid Glass), a few steps
from the window fill, so the icons were the colour under them.

A file's glyph now rests in one colour wherever it is shown,
`core.widgets.treeGlyphColor`: the theme's control text, as the tree's labels,
a document tab's icon and a row carried in glass already were.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@foxnne
foxnne force-pushed the workbench/float-icon-contrast branch from 795cc21 to 766ed91 Compare October 19, 2026 21:29
@foxnne
foxnne marked this pull request as ready for review October 19, 2026 21:29
@foxnne
foxnne enabled auto-merge October 19, 2026 21:33
@foxnne
foxnne added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit f0cb63c Oct 19, 2026
11 checks passed
@foxnne
foxnne deleted the workbench/float-icon-contrast branch October 19, 2026 22:03
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.

1 participant