Repository navigation
Show app icons in the results bar - #92
Merged
Merged
Conversation
Apps and System Settings panes get their Finder icon, sized to the text and cached per path. Built-in panes are empty stubs, so they use the System Settings icon. Icons are fetched only for items being drawn. Off by default.
Icons were drawn at the fractional x offset that follows the preceding text, so they straddled device pixels and were resampled. Align the icon rect to the backing grid and draw with high-quality interpolation.
# Conflicts: # README.md # dmenu-macTests/AppearanceManagerTests.swift # dmenu-macTests/AppearanceSettingsModelTests.swift # src/AppearanceSettings.swift # src/CompositeListProvider.swift
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds an optional icon before each result in the horizontal bar.
NSWorkspace.icon(forFile:)), sized to the font's text height and cached per path inIconCache. Built-in panes are empty stubs that Finder shows as blank documents, so they use the System Settings icon. A pane that ships its own icon keeps it.$PATHprograms, piped stdin choices and typed commands get no icon.FileURLRepresentableprotocol thatCompositeListProvider's tagged wrapper also adopts.ListItemitself does not change.Testing:
xcodebuild ... testpasses (222 tests). The new tests cover the setting's default, round trip, model notification and reset, URL extraction (including through the composite provider), the stub pane icon fallback, and layout width with icons on and off.swiftlint --strictis clean. I also rendered the view offscreen with Calculator, Displays (pane), nvim (command) and Safari and checked the result by eye. The icons line up with the text, the pane shows the System Settings gear, and nvim has no icon.🤖 Generated with Claude Code