Otter-shell · #79

Icon theme loading doesn't work in plugin sd_bar_item, and they are misalinged

ClosedBugMedium1 votes1 commentsby Cosmo

Allow creating proper icon bar plugins

Bug report

Steps to reproduce

Make a custom plugin with an sd_bar_item

https://git.pika-os.com/Cosmo/bluetooth-applet

Expected behavior

the icon i put is resolved by selected free desktop icons theme, like otter built in otter bars, or otter custom buttons,

and when default size is small, it should all still look good

Actual behavior

does not resolve via freedesktop (only icon that worked was "database" which is otter hardcoded)

the icon is always this small no matter font size or default width

and when setting default width to 20, the icon isn't centered

Environment

PikaOS 4

Discussion

Ferreo

Fixed and pushed.

  • otter-ui 184dc8d: fixed/dynamic image caches now prefer selected XDG icon theme, invalidate on theme changes, and support foreground-tinted symbolic icons; icon-only buttons no longer reserve an 8px text gap in tight slots.
  • otter-bar d98d9e7: sd_bar_item resolves arbitrary XDG icon names before bundled fallbacks, uses full bar slot height, and resets dynamic cache safely across hot reload.
  • otter-shell-plugins 2fb19a4: ABI docs now describe XDG icon-name behavior.

Verification: ReleaseFast tests/builds pass. Built the linked bluetooth-applet, changed its test icon from hardcoded database to bluetooth-active-symbolic, loaded it in a 20px plugin slot under headless Sway with Pop selected, and visually confirmed an 18px centered icon before and after theme hot reload. No nested Hyprland session was used.

Sign in with Discord to comment.