Skip to content

Follow the desktop theme on Linux; add AppImage update information - #205

Merged
nilres merged 1 commit into
masterfrom
claude/appimage-theme-updates-86f56a
Nov 15, 2026
Merged

nilres merged 1 commit into
masterfrom
claude/appimage-theme-updates-86f56a

Conversation

@nilres

@nilres nilres commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Addresses the two suggestions of the AppImage catalog test in AppImage/appimage.github.io#11522.

Light theme unless the desktop is dark

With the theme System, egui uses fallback_theme when the window system reports no theme, and that defaults to dark. winit 0.30 reports none on Linux (X11 always None, Wayland only its own overrides), so the editor and the parts manager always started dark there.

  • New openecraft_ui::theme::follow_system, called at start by the editor and the parts manager:
    • sets the fallback to light (after eframe restored the stored options, so an old stored dark fallback is replaced)
    • on Linux reads org.freedesktop.appearance color-scheme from the settings portal (ReadOne, Read for version 1 portals), otherwise a GTK_THEME named dark, and follows SettingChanged in a thread; the start waits at most 300 ms for the first answer
  • A theme chosen in the settings is unchanged (theme_preference is persisted by egui).
  • zbus (Linux only) was already in the build through egui's AccessKit; Cargo.lock gains only the edge.

AppImage update information

  • build.sh passes -u "gh-releases-zsync|<owner>|<repo>|latest|OpenECraft-*-<arch>.AppImage.zsync" (owner/repo from GITHUB_REPOSITORY, default nilres/OpenECraft; APPIMAGE_UPDATE_INFO overrides, empty disables), requires zsyncmake and checks that the .zsync was written.
  • appimagetool 1.9.1 writes the .zsync into the current folder, so it now runs in target/installer/.
  • CI installs zsync in the Debian container and uploads *.AppImage.zsync; the release workflow copies the whole artifact, so the file lands in the release and SHA256SUMS.
  • The editor's own AppImage updater is unaffected.

Testing

  • cargo test --workspace, cargo clippy --workspace --all-targets and the wasm clippy pass (Windows).
  • The Linux module was compiled and tested in WSL against a stand-in for the few egui calls (WSL's rustc is too old for egui 0.37), including a fake org.freedesktop.portal.Settings service: correct theme at start with ReadOne and with Read, light/dark on SettingChanged, other keys ignored. That test caught a lost change right after start, fixed by subscribing before the first read.
  • A small AppImage built in WSL with appimagetool 1.9.1 has the update information in .upd_info and its .zsync next to it.

Not tested: the full AppImage build (runs in CI's linux-packages job) and the app on a real GNOME/KDE desktop. After the next release, /retest on the catalog PR should confirm both suggestions are resolved.

🤖 Generated with Claude Code

The AppImage catalog review found the editor dark on a light desktop and
the AppImage without update information.

- openecraft-ui `theme`: light fallback for the theme "System"; on Linux,
  where winit reports no theme, the colour scheme of the settings portal
  (or a dark GTK_THEME) chooses and changes are followed while running
- Editor and parts manager use it at start
- build.sh embeds gh-releases-zsync update information and writes the
  .zsync file next to the AppImage (APPIMAGE_UPDATE_INFO overrides)
- CI installs zsync and uploads the .zsync with the Linux packages
- Changelog, installation and release docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nilres
nilres merged commit 7db755a into master Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant