no all icons are shown #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
some icons are missing but in other menu drawer apps they have.
STATUS: DONE
Goal
Restore missing application icons by fixing path resolution logic and implementing standard XDG icon fallback mechanisms.
Analysis
XDG_DATA_DIRSsearch paths for both absolute and relative icon names defined in.desktopfiles./usr/share/icons,/usr/share/pixmaps) or handling relative path fallbacks properly.desktop.goextraction logic to validate both absolute and icon-name-only strings. Add a function to search fallback locations. Update UI rendering to handle missing images gracefully by reverting to text label (as per project docs).Implementation Steps
STEP-01: Identify Specific Missing Icon Scenarios
tsTart -listand compare generated list against expected.desktopsources. Inspect specific app configurations in/usr/share/applicationsthat fail to render icons locally.systemd/xdgenvironment variables populated..desktopfiles claim an icon but the image does not exist at the exact path stored in memory.STEP-02: Implement Icon Path Resolution Logic in
desktop.godesktop.EntryIcon()function to check existence atExecPath, then/usr/share/icons/hicolor/..., then$HOME/.icons. Handle relative paths (e.g.,icon-name) by searching these directories.appsresolves to/usr/share/icons/hicolor/48x48/apps.pngif absolute path is invalid.STEP-03: Enhance Image Loading Handler in
main.gogio.Errorwhen loading failed PNGs. If load fails after searching fallback directories, set state to "NoIcon".main.goand Gio'sImage.Load()API reference.STEP-04: Update UI Render Logic for Missing Icons (Fallback)
icon.Valid()status. If invalid, render application name text with selected font/color instead of empty space.main.goorui.go).STEP-05: Add Unit Tests for Icon Fallback Scenarios
desktop_test.gowith test cases using mock.desktopfiles that specify non-existent icons. Assert that the parsing logic sets a correct fallback path or text.go test ./...).testing.Twithout errors.Acceptance Criteria
.desktopfiles now search standard XDG directories.Risks/Notes
$XDG_DATA_DIRS) vary per user setup; ensure logic defaults to standard paths rather than relying solely on env vars in tests.image/vectorconfigurations for scaling icons; verify that resolution search does not cause memory overhead issues during startup.