Skip to content

Launcher: dropdowns in the app's own style, and language names in their own language - #278

Merged
v0lumehi merged 3 commits into
mainfrom
v0lumehi/styled-menus
Oct 30, 2026
Merged

v0lumehi merged 3 commits into
mainfrom
v0lumehi/styled-menus

Conversation

@v0lumehi

@v0lumehi v0lumehi commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Fix or feature

  • Fix
  • Feature

What and why

The pickers in the launcher opened the system's popover, with its arrow and grey material. The language picker in Settings sat between buttons in the app's own style and looked out of place.

I added LauncherDropdown (frontend/Sources/NSPortBuilder/LauncherDropdown.swift). It replaces LauncherMenuPicker. It uses the app's palette, Manrope, the corner radii of LauncherSecondaryButtonStyle and the launcher's dark surface. The list is drawn by the app, not by the system. The chosen row has a checkmark. The list opens below the button, or above it when there is no room, and scrolls when it fits on neither side.

  • The list is drawn at the root of the window or sheet (.launcherDropdownHost()), so the Settings scroll view does not cut it off. Each sheet is a window of its own and has its own host. A dropdown without a host opens the same list as a popover.
  • Keyboard: Space or Return on the button opens it. Arrow keys move, Return or Space pick, Esc closes.
  • VoiceOver: the button reads the setting name and the choice as its value. The list is modal and VoiceOver focus moves to the chosen row. The chosen row has the selected trait. Escape closes it.
  • The button never cuts its label short. In Settings it is at least as wide as the language picker was made in Restart now really restarts, and Settings rows wrap instead of cutting words #277 and grows with its label. fill keeps the old behaviour for the controls in the sheets.
  • Language names are in their own language: 中文, English, Svenska, Deutsch. Only the "system language" entry follows the UI language. The picker and the controller cycling share one list, BuilderView.languageCodes, so a new language is one more code.

Pickers that use it: language, install device and signing team (Builds), controller mode and button assignment (Controls sheet), choice settings with more than three options (Launch options sheet), and the device selector (Saves sheet).

I left row(...) in ContentView.swift alone, the wrapping of the row details is #277. The language picker keeps the 180 pt minimum from #277.

Checked

  • Tests: cd frontend && swift build && swift test pass (512 tests, 16 skipped). New tests cover the list placement, its width, the arrow keys and the language names.
  • Visual QA: NX_LAUNCHER_CAPTURE_DIR=<dir> swift test --filter LauncherDropdownTests renders the Settings row with the list. The popup in a running window is not checked. I did not launch the app.
  • Run on a device or Mac: not run. VoiceOver and the real window behaviour are not checked by hand.

Screenshots

The capture test renders the Settings language row in German with the list open. The button shows "Systemsprache" in full and the list shows the endonyms with a checkmark on "Deutsch".

Scope

  • No vendored file (dm/, scripts/, docs/, ref/, AGENTS.md) is edited directly
  • Not a fix to the engine or a game profile
  • No keys, game files or data extracted from a game in the change or the attachments

@v0lumehi v0lumehi added enhancement New feature or request launcher The NX2Apple launcher app mac Mac labels Oct 30, 2026
@github-actions github-actions Bot added the windows Windows (the Qt front end) label Oct 30, 2026
@v0lumehi
v0lumehi force-pushed the v0lumehi/styled-menus branch from 190db14 to c8fa125 Compare October 30, 2026 22:20
@v0lumehi v0lumehi added bug Something isn't working and removed enhancement New feature or request labels Oct 30, 2026
@v0lumehi
v0lumehi merged commit e9c351d into main Oct 30, 2026
10 checks passed
@v0lumehi
v0lumehi deleted the v0lumehi/styled-menus branch November 1, 2026 02:05
zynilver pushed a commit to zynilver/NX2Apple that referenced this pull request Nov 1, 2026
… too (from PR LNPANDY#17)

Upstream LNPANDY#278 (open, --platform takes a list) rewrites the out_ipa block: out_ipa moves under
'if want_ios:' indented 8 spaces, the mac_pack check becomes an out_app block, and `work`
stays last. Our single anchor was written for today's shape and would have stopped matching on
the first sync after LNPANDY#278 lands.

JMRBDev's PR LNPANDY#17 detected that and proposed the shape split; this is that idea with one
change — each shape is a single (old, new) pair instead of a delete plus an insert. His version
removed the `work` line first and re-inserted it, so a future anchor drift between the two
steps would have left the tree without the assignment.

Verified by applying patch_nsp() to both shapes (upstream/main and a hand-built LNPANDY#278 fixture):
work is assigned before out_ipa in both, and the pre-LNPANDY#278 output is byte-identical to the tree.
Credit: PR LNPANDY#17.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working launcher The NX2Apple launcher app mac Mac windows Windows (the Qt front end)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant