Commit Graph

7 Commits

Author SHA1 Message Date
Brandon Thomas 0bea7178a2 Merge branch 'land' into fix-203 2026-10-11 15:04:30 -04:00
Brandon Thomas abbd8181b9 Fix-up: theme test picks System from Backstage Options' Display theme combo (#318 after #331)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 12:31:17 -04:00
Brandon Thomas 4d2335c8f5 Fix-up: Spanish, German and Czech strings for the features merged alongside them; theme test goes through Backstage Options (#318 after #331)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 12:21:15 -04:00
vangel76 838304accf UI: title-bar light/dark switch, File › Display theme, system appearance on first run (#194, #239)
The theme could only be chosen in the View tab's Display theme box, and
the app always started light. Now:
- a title-bar button switches light/dark in one click (view.darkMode);
  right-click offers System / Light / Dark;
- File › Display theme offers the same three (Excel keeps it under
  File › Account › Office Theme);
- the desktop app follows the system appearance until a theme is chosen
  and saved in ui.json (UiState's default stays light for tests).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 12:43:47 +02:00
GyuriX e8d935298f Linux: the display theme asks the desktop, not winit
winit reports no system theme on Linux — `ActiveEventLoop::system_theme()` is
`None` there on every desktop — so `System` in the appearance setting never saw
the desktop's choice and fell back to light. A new `desktop_theme` module asks
the XDG Desktop Portal's Settings interface for
`org.gnome.desktop.interface color-scheme` on a thread of its own, so no
D-Bus call is ever made from the frame loop, and the app follows the answer,
including a change made while it runs.

egui resolves `ThemePreference::System` from what winit reports and offers no
way to set that itself, so where a desktop answered, the app hands egui the
concrete theme instead. What is drawn is unchanged on macOS and Windows, where
winit answers and the same resolution happens a step earlier; the saved
preference is still `system`, so a file keeps meaning the same thing.

The colour scheme is asked for under its GNOME schema name first, which GNOME's
portal and XFCE's both answer, then under the older freedesktop one, which KDE
answers. A desktop that answers neither leaves the user's own choice alone.
2026-10-10 21:55:20 +02:00
Brandon Thomas d7c77e94cd Review fix-up: locale-independent defaults, lenient saved language, listed commands
- UiState::default() is English: tests, the kittest harness and the
  snapshot example no longer depend on the host's locale. The desktop app
  alone starts from the system language, when ui.json names no supported
  language (first run, an older file, an unknown value).
- An unknown or malformed saved language reads as English instead of
  failing the whole UiState and resetting every other preference.
- app.language.set takes {"language": "ja"} (with `code` as an alias, the
  name the PR description used); the View combo now uses it via
  Language::code(). The app.language.* commands are listed by
  engine.commands with the other UI commands and documented in
  docs/control-protocol.md.
- Home's text "Orientation" (方向) and Page Layout's print "Orientation"
  (印刷の向き) get separate keys through a `context|label` key form.
- Japanese: Hide Rows → 行を表示しない, Trace Dependents → 参照先のトレース;
  translate the display-theme combo merged in from main.
- system_theme test: the View tab now has two combo boxes; pick the theme one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:44:57 -04:00
harrisonoconnorhover 922847a1ed Add system-following interface appearance (#72) 2026-10-09 21:35:21 -04:00