Skip to content

Qt front end: the Mac launcher's palette, Manrope and control styles - #222

Merged
v0lumehi merged 3 commits into
mainfrom
v0lumehi/qt-design
Oct 31, 2026
Merged

v0lumehi merged 3 commits into
mainfrom
v0lumehi/qt-design

Conversation

@v0lumehi

@v0lumehi v0lumehi commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

The Qt window (Windows, and macOS when run from source) still used a palette taken from old Mac screenshots: blue accent, blue-grey cards, system fonts. The Mac launcher has moved to a near-black background, a cream accent and Manrope. This brings the Qt window to the same look. Look and feel only: no behaviour change, no string change, no wordmark added.

  • Palette from LauncherPalette as hex: background #0e0e0f, surface/cards #1a1a1c, cream #fff0d6, ready #40d678, building #ffc73d, unbuilt #91949c, red #ff6b66 (the launcher's destructive red). The translucent white fills of the Mac buttons are pre-mixed into opaque colours.

  • style.py: buttons (5.5% fill, 10% hairline, radius 9, cream primary with dark text, hover and pressed), cards with a hairline, inputs, combo boxes, menus, tooltips, scroll bars, progress bars, the log, the cream switch for check boxes and the cream slider. The dimmer path text and the brighter hint text stay distinct.

  • Manrope: style.load_font() registers frontend/fonts/Manrope.ttf with QFontDatabase.addApplicationFont at start-up and falls back to the system font if the file is missing or rejected. Monospaced text stays monospaced. Not copied: a source run reads the file the Mac app embeds, and build-qt.yml adds it and Manrope-OFL.txt to the Windows bundle's fonts folder (PyInstaller --add-data).

  • ui.py: one line, the separator colour now comes from the palette. No blue accent is left in frontend-qt.

  • Header: the product name and the green icon tile are gone (no wordmark inside the window), and so is the subtitle that still said archive shards, which were removed in Patch queue: drop the ROMFSARC reader and the touchpad experiment (proposal) #162. The app.subtitle key is deleted from Localization.swift (it was unused there) and the Qt table is regenerated. Only the language button stays. Window title and app name are unchanged. The other archive strings describe the single romfs.img and are still accurate.

The remaining change to ui.py is minimal so it merges easily with #206.

Checked

  • Tests: python3 -m unittest discover -s frontend-qt/tests with PySide6 6.12: 172 run, 1 error that is also on main (test_win.InstallFailureHintTest uses M.BuildModel, which does not exist). python3 scripts/patches.py check passes.
  • Visual QA: main window grabbed offscreen with QWidget.grab() before and after (dependency panel, build in progress with log, failure card), next to the Mac captures from NX_LAUNCHER_CAPTURE_DIR. Not checked: the PyInstaller bundle itself (the font path in a frozen build is only exercised by the Windows workflow) and a real Windows run.
  • Run on a device or Mac: not applicable (look only).

Screenshots

The CLI cannot upload images, so they are local: before in /tmp/qtstyle/before-qt/ (main-deps, build-running, failure-card), after in /tmp/qtstyle/after/ (same names), Mac reference in /tmp/qtstyle/mac/.

Scope

  • No vendored file (dm/, scripts/, docs/, ref/, AGENTS.md) is edited directly: a change there is a patch in patches/ (scripts/patches.py export, and patches.py check passes), with its Upstream-Status
  • A fix to the engine or a game profile is also (or first) a PR at seedds/nxnative: not applicable, no engine change
  • No keys, game files or data extracted from a game in the change or the attachments

This changes how the Windows app looks, so it is a product change: it waits 48h before merging.

@v0lumehi v0lumehi added windows Windows (the Qt front end) ci Workflows and repository tooling enhancement New feature or request labels Oct 30, 2026
@github-actions github-actions Bot added documentation Improvements or additions to documentation launcher The NX2Apple launcher app labels Oct 30, 2026
@v0lumehi

Copy link
Copy Markdown
Collaborator Author

@LNPANDY rebased onto current main, CI green. It only changes the look of the Qt front end (Windows), the palette, Manrope and the control styles of the Mac launcher. It can merge after the 48 hours, from 2026-10-31 19:56 UTC, unless you have objections.

@LNPANDY

LNPANDY commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Reviewed against current main. The palette matches the SwiftUI app (I checked the values against LauncherView.swift:16-21), and the OFL notice travelling with the font in the Windows bundle is right. Two things to settle before it merges.

  1. The Qt table was stale, and main has since fixed it. The committed localization.py in this branch is 18 keys behind Localization.swift (they came from Folder scan reads bare title IDs, rows refuse files that do not fit #246 on main, not from this PR), so "the Qt table is regenerated" was not true of the file. I fixed that side in Qt front end: ask Windows for the ISO language code, and regenerate the language table #256 (merged, db4c6924): the table is regenerated and the Qt test job now fails when gen_localization.py would change it. Please rebase, and keep main's localization.py rather than this branch's — otherwise the merge puts the 18 keys back.
  2. The Windows package has not been built. build-qt.yml only runs on tags and manual dispatch, so nothing here has exercised PyInstaller with fonts/Manrope.ttf and its licence. Run it once (gh workflow run build-qt.yml --ref v0lumehi/qt-design) and check the zip contains fonts/Manrope.ttf and fonts/Manrope-OFL.txt and that the app starts on Windows.

Smaller suggestions, none blocking: style.py:61-63 should prefer the Manrope family and fall back to families[0] (the TTF's legacy family name is "Manrope ExtraLight"; macOS reports "Manrope" but DirectWrite has not been checked), and the QCheckBox/QSlider/QComboBox styles at style.py:233-249 have no user in the tree.

Once it is rebased and the Windows artifact is checked I will merge.

@v0lumehi

Copy link
Copy Markdown
Collaborator Author

@LNPANDY rebased onto current main and force-pushed (7cef9ed7), CI green. Point by point:

  1. Qt table. Kept main's localization.py and regenerated it after the rebase, so the 18 keys from Folder scan reads bare title IDs, rows refuse files that do not fit #246 stay. The regenerate-and-diff check passes. One more key was missing: cheats.iosNote from Cheats sheet: say that cheats are turned off on iPhone and iPad #257 is in Localization.swift but not in main's table, so the regeneration adds it (one line). Main's Qt job will hit the same difference on its own.
  2. Windows package. Ran build-qt.yml on v0lumehi/qt-design (run 41086288060, success). The zip NS-Port-Builder-qt-windows-x64.zip contains NS Port Builder\_internal\fonts\Manrope.ttf (164700 bytes) and NS Port Builder\_internal\fonts\Manrope-OFL.txt (4480 bytes). PyInstaller 6 puts them under _internal, which is sys._MEIPASS, and _font_file() looks there first. I listed the zip only. I cannot start the app on Windows from here, so that part is still open: could you or a Windows user start it once and check that Manrope shows?
  3. style.py font family. load_font() now returns Manrope when Qt reports that family and falls back to families[0] otherwise.
  4. Unused styles. Grepped the tree: no QCheckBox, QSlider or QComboBox anywhere in nspb_qt (the only hits are the iOS Launcher.m UISlider). Removed those styles. QLineEdit stays, since QInputDialog uses one.

0xBEEBAD pushed a commit to 0xBEEBAD/NX2Apple that referenced this pull request Oct 30, 2026
…he language table

Two bugs the PR review of LNPANDY#222 turned up in the current main:

- `nspb_qt/i18n.py` asked `GetLocaleInfoW` for `0x02`, which is LOCALE_SLANGUAGE,
  the *localized display name*. On a Chinese Windows that answer is
  "中文(简体,中国)", the prefix test for "zh" never matched, and the early return
  handed the user an English interface — the very report the comment above the call
  says was fixed. The ISO 639 code is `0x59`, and the LANGID is masked with 0x3FF
  (the primary language) rather than 0xFF.
- `nspb_qt/localization.py` was 18 keys behind `Localization.swift`: LNPANDY#246 added
  them to the Swift table without running `gen_localization.py`. They were never
  visible because the Windows bundle regenerates the table before packaging, but a
  source run of the Qt app showed the raw keys. Regenerated here.

The Qt test job now regenerates the table and fails on any difference, so a string
added to the Swift table cannot leave the Qt one stale again.

Tests: `python -m unittest discover -s frontend-qt/tests` 179 tests OK. New:
`test_windows_is_asked_for_the_iso_language_code` asserts the constant passed to the
API (the existing test mocked only the answer, which is how 0x02 survived), and
`test_a_windows_display_name_still_selects_the_language` covers zh/sv/de/en answers.
@v0lumehi
v0lumehi force-pushed the v0lumehi/qt-design branch 2 times, most recently from 7d2fe91 to b6ecbb6 Compare October 30, 2026 21:21
Near-black background, cream accent and primary buttons, the launcher's ready, building and red
for the state colours, Manrope loaded at start-up with a system-font fallback, and the Windows
build ships the font with its licence. Look only, no behaviour or string changes.
The window header no longer shows the product name or the green icon tile, and the subtitle that
still mentioned archive shards (removed in #162) is gone from the Swift string table and the
generated Qt table. Only the language button stays in the header.
… and combo box styles

Also regenerates localization.py (cheats.iosNote from #257 was missing on main).
@v0lumehi
v0lumehi requested a review from LNPANDY October 31, 2026 16:51
@v0lumehi
v0lumehi merged commit 4bb8e7b into main Oct 31, 2026
11 checks passed
@v0lumehi
v0lumehi deleted the v0lumehi/qt-design branch November 1, 2026 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Workflows and repository tooling documentation Improvements or additions to documentation enhancement New feature or request launcher The NX2Apple launcher app windows Windows (the Qt front end)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants