Elektrine lite

← Feed

@_inside@mastodon.social

Post #1175472

2026-03-14 12:35 UTC

If you have a Mac app that displays its own icon somewhere in the UI, it can end up showing the incorrect icon if the user's icon style changes while the app is running. Here's a SwiftUI view that can handle that and always display the icon that matches the current system style: https://gist.github.com/insidegui/686ae55087542b430be976918418d129

Replies (3)

  • @selsoe@mastodon.social 2026-03-14 13:16

    @_inside is this possible on iOS?

    Open ##1789084

  • @siracusa@mastodon.social 2026-03-14 13:51

    @_inside …with the caveat that, if your app uses https://developer.apple.com/documentation/appkit/nsapplication/applicationiconimage to change its icon, the icon image view will not reflect this change because (as far as I know) there are no public APIs to get the correct icon. (The Dock will show the change, of course.)

    Open ##1789086

  • @macfixer@mastodon.social 2026-03-25 13:51

    @_inside Will it work for icons for some of these *ahem* older apps, like Arc?

    Open ##1789087