Icons: follow the icon theme spec so KDE apps in the dock get real icons
CI / test (push) Failing after 19s

Pinned KDE apps (Konsole, Dolphin, Kate, KWrite, System Settings) showed
letter tiles because their Icon= names a theme icon (utilities-terminal,
system-file-manager, preferences-system) that only breeze has, and breeze
keeps icons in <context>/<size> (apps/48), which the hard-coded
<size>x<size>/apps lookup never looked in.

The lookup now reads each theme's index.theme (Directories, sizes, Type,
Scale), picks the closest directory as the spec says, searches the user's
theme (kdeglobals [Icons] Theme, GTK settings.ini, $CHANDRA_ICON_THEME) and
its Inherits chain, then hicolor, then breeze and Adwaita. It also tries the
desktop id and its last dotted part, and falls back to the theme's generic
application-x-executable icon before the letter tile. Misses are logged.

The dock's first pins are now the installed default browser, file manager,
terminal and editor (Settings > Apps) instead of the catalog's first five.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hkNwArmSLRGcuxUMhw
This commit is contained in:
Claude committed 2026-11-25 22:33:03 +00:00
1 parent da56f59cf7
commit 114f0b4e04
4 files changed
+553 -54

No files matched your search

+3
View File
@@ -237,6 +237,8 @@ pub(all) struct DesktopShell {
/// (0: no icon), for the `icons` capability.
icon_names : Map[String, String]
icon_handles : Map[String, UInt]
/// Icon base dirs and theme chain (icons.mbt), read on first use.
mut icon_search : IconSearch?
/// Wayland socket handed to launched apps as WAYLAND_DISPLAY.
display : String
/// Panel modules in panel order; a module with `stretch` splits the panel into a left and a right group.
@@ -382,6 +384,7 @@ pub fn DesktopShell::new(display : String) -> DesktopShell {
wm_classes,
icon_names,
icon_handles: {},
icon_search: None,
display,
widgets: [],
next_slot: 1,