From 49217aec6c616056d58c3258a60ab30bce0fd701 Mon Sep 17 00:00:00 2001 From: Coy Geek <65363919+coygeek@users.noreply.github.com> Date: Sun, 11 Oct 2026 12:23:49 -0700 Subject: [PATCH] fix(theme): complete Linux System appearance tracking (#1017) * fix(theme): complete Linux System appearance tracking Follow up on #881 for #446 with the standard numeric appearance portal setting and event-driven updates that wake idle windows. Keep manual modes independent, cache their desktop updates without repainting, and cancel the worker on close. Retain inherited native window appearance and populate both egui style branches with the chosen palette. Preserve saved System, the Light default and unknown source fallback, and avoid desktop session access in headless UI contexts. Assisted-by: Codex (gpt-6.1-sol) * Desktop theme: keep the GNOME colour-scheme fallback XFCE needs The portal tracker read only org.freedesktop.appearance, which XFCE's portal doesn't answer (it proxies the GSettings schemas). It now also reads and subscribes to org.gnome.desktop.interface color-scheme and uses it when the freedesktop setting states no preference, as main's reader did. KDE answers only the freedesktop one, which wins when it states a preference. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Brandon Thomas Co-authored-by: Claude Opus 5.5 --- Cargo.lock | 2 + ROADMAP.md | 3 + apps/pdfcraft/src/main.rs | 2 + crates/platform/Cargo.toml | 15 +- crates/platform/src/desktop_theme.rs | 630 ++++++++++++++++++++----- crates/ui-egui/src/lib.rs | 57 ++- crates/ui-egui/src/theme.rs | 12 +- crates/ui-egui/tests/ui_group/theme.rs | 89 +++- docs/development.md | 22 + docs/roadmap.md | 5 +- 10 files changed, 696 insertions(+), 141 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 19b1bcb97..47121b7e3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3841,6 +3841,8 @@ dependencies = [ name = "pdfcraft-platform" version = "0.6.0" dependencies = [ + "async-channel", + "futures-lite", "zbus", ] diff --git a/ROADMAP.md b/ROADMAP.md index 7e12431d1..45f7ec002 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -169,6 +169,8 @@ Newest first: the date, what moved, and the new overall estimate. - **2026-10-10 (M12, XFA rows and areas):** Dynamic XFA forms lay out a repeating subform inside a top-to-bottom container in positioned content (a table in an area) with all its instances, drawn and measured, instead of one; and areas no longer appear in data paths (`pdfcraft_xfa::data_path`), since they are not data scopes. Before, a form whose fields sit in an area read none of the values Adobe's viewers saved, wrote what was filled here under a new element named after the area, which Adobe's viewers would most likely not read, and a FormCalc total looping over the table's rows failed on the rows that were missing. Layout, the script tree, reading and writing the data and the engine's value and row operations share the one path rule. Synthetic tests cover the layout, the path rule and the whole round trip (rows, Adobe-written values, a FormCalc total over all rows, the written data, reopening). Still open for such forms: XFA script objects (`