Repository navigation
Conversation
Accessibility gives a menu item's title and shortcut but no image, and macOS 26 picks its menu icons from the item's action, which Accessibility doesn't share. Standard commands now get the icons AppKit gives their actions, matched by title in English menus and by their usual shortcut otherwise. AppKit's own Quit and Hide images load by name; its private Help and Emoji ones get public symbols. Menus with an icon keep an icon column on every row, as native menus do. Earlier macOS versions keep text-only menus. Closes #322
Collaborator
Author
|
Closing without merging. macOS Accessibility gives a menu item's title and shortcut but no image and no action, so StableBar can only guess icons for standard commands. Apps that draw their own icons, such as Docker, would still lose them, and some items would gain icons their native menus don't show. Partial icons look worse than consistent text-only menus, so we're keeping text-only menus. Details in #322. |
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.
Problem
Fixes #322. On macOS 26, native menus show an icon beside standard commands (About, Settings…, Hide, Quit, Undo, Copy, Paste…). StableBar's app menu popups, which also serve the Apple menu and the menus opened from Menu bar items (such as Docker Desktop's), showed text only.
Accessibility can't supply those icons. It gives each item's title, shortcut, check mark and enabled state, but no image and no action, and macOS 26 picks its automatic menu icons from the item's action selector, never its title. Icons an app sets itself, such as Docker's Dashboard and account pictures, can't be read at all. The popup's theme and StableBar's own submenus stay, so opening the real macOS menu was not an option.
Changes
AppMenu.swift. Each entry gets asymbolon macOS 26: AppKit's icon for that standard command, matched by English title (menuTitleSymbols, plusAbout …,Quit …,Undo …,Redo …and… Help) or else by its usual shortcut (menuShortcutSymbols, for menus in other languages). ⌘P is left out because some apps use it for Go to File. The shortcut is read only when the title doesn't match, so most items cost no extra Accessibility call.Quit_app,Hide_app…), which load by name. AppKit's Help (tips) and Emoji & Symbols (emoji.face.grinning) icons are private system symbols, soquestionmark.circleandface.smilingstand in.PopupView.swift.AppMenuListkeeps an 18 pt icon column on every row when any item in the menu has an icon, so titles line up as in native menus. Menus without icons look as before.docs/widgets.md. The App menus section describes the icons and what can't be shown. I kept the sentence out of the Menu bar items paragraph because feat: open the Menu bar items row on hover #321 edits the lines around it.Testing
swift teston this branch, rebased onmain: 294 XCTest and 458 Swift Testing tests pass.appMenuEntriesShowTheSymbolsMacOSGivesStandardCommandsreads a fake Docker-style menu through the injected Accessibility reader. It checks matches by title (Settings...with three dots too), by shortcut for German titles (⌘Q, ⌥⌘H), and no icon for ⌘P, ⇧⌘Q or app-specific items.everyMenuSymbolDrawsdraws every symbol in the tables through the row's ownmenuSymboland checks it has a size. It caught the two private system symbols above.PopupViewwith fixture menus: Docker Desktop's menu (as in the report), a Safari app menu and an Edit menu. Built-in, Paper and Rosé Pine, light and dark. Before ismain, after is this branch:face.smilingturns solid in dark mode. That's the symbol's own design, the same in a plainImage(systemName:).#available(macOS 26, *).Merging
One commit. A merge commit or rebase merge keeps it in the changelog.
Claude Opus 5.5 via Claude Code