From 7f337d5261ed149e62907d90dd00bc5401688311 Mon Sep 17 00:00:00 2001 From: Dasemu Date: Mon, 16 Nov 2026 19:41:56 +0100 Subject: [PATCH] feat(gui): About view with Slint attribution Adds an About view (sidebar) showing the Grove version, its MIT licence and the AboutSlint widget, which satisfies the attribution clause of the Slint Royalty-free Desktop, Mobile, and Web Applications License 2.0. Documents the licence choice in README and docs/phase7.md. Co-Authored-By: Claude Opus 5.5 --- README.md | 4 +++ crates/grove-gui/src/main.rs | 1 + crates/grove-gui/ui/app.slint | 48 ++++++++++++++++++++++++++++++++++- docs/phase7.md | 6 +++-- 4 files changed, 56 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f66ecd5..00983f6 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,7 @@ work in progress. Early stage (Phase 1: core library and CLI). See `docs/` for d ## License MIT, see `LICENSE`. + +The desktop app (`grove-gui`) is built with [Slint](https://slint.dev), used under the +Slint Royalty-free Desktop, Mobile, and Web Applications License 2.0. As that licence requires, +the app shows the `AboutSlint` attribution on its About screen (sidebar, "About"). diff --git a/crates/grove-gui/src/main.rs b/crates/grove-gui/src/main.rs index 3aede80..4c24ae2 100644 --- a/crates/grove-gui/src/main.rs +++ b/crates/grove-gui/src/main.rs @@ -1331,6 +1331,7 @@ fn run() -> Result<()> { slint::set_xdg_app_id("grove").ok(); let ui = MainWindow::new().context("create window")?; + ui.set_version(env!("CARGO_PKG_VERSION").into()); let ctx = Ctx { core: core.clone(), weak: ui.as_weak(), diff --git a/crates/grove-gui/ui/app.slint b/crates/grove-gui/ui/app.slint index 7e8c385..4a387a3 100644 --- a/crates/grove-gui/ui/app.slint +++ b/crates/grove-gui/ui/app.slint @@ -1,4 +1,4 @@ -import { Button, CheckBox, ComboBox, LineEdit, Palette, ScrollView } from "std-widgets.slint"; +import { AboutSlint, Button, CheckBox, ComboBox, LineEdit, Palette, ScrollView } from "std-widgets.slint"; export struct Wt { branch: string, @@ -183,6 +183,7 @@ export component MainWindow inherits Window { in property pill-text: "Connecting…"; in property pill-key: "muted"; in property machine; + in property version; in property repo-count; in property wt-count; in property attention-count; @@ -304,6 +305,14 @@ export component MainWindow inherits Window { } } + NavItem { + text: "About"; + active: root.view == "about"; + clicked => { + root.go("about"); + } + } + Rectangle { } Muted { @@ -908,6 +917,43 @@ export component MainWindow inherits Window { } } + // ---------- about ---------- + // Showing AboutSlint here is the attribution required by the Slint + // Royalty-free licence (see README, "Licence"). + if root.view == "about": VerticalLayout { + spacing: 12px; + alignment: start; + H1 { + title: "About Grove"; + sub: "Keeps your git repositories in sync across machines, including work in progress."; + } + + Card { + Text { + text: "Grove " + root.version; + font-size: 16px; + font-weight: 700; + } + + Muted { + text: "Grove is released under the MIT licence."; + wrap: word-wrap; + } + + Muted { + text: "Its user interface is built with Slint, used under the Slint Royalty-free Desktop, Mobile, and Web Applications License 2.0."; + wrap: word-wrap; + } + } + + HorizontalLayout { + alignment: start; + AboutSlint { + max-width: 420px; + } + } + } + // ---------- settings ---------- if root.view == "settings" && root.has-config && !root.onboarding-active: VerticalLayout { spacing: 12px; diff --git a/docs/phase7.md b/docs/phase7.md index 6679f7f..4752b2c 100644 --- a/docs/phase7.md +++ b/docs/phase7.md @@ -60,8 +60,10 @@ X11 loaded at runtime) and the software renderer. ## Dependencies - `slint` / `slint-build` 1.18.1 (`std`, `backend-winit`, `renderer-software`, `compat-1-2`; no Qt, - no femtovg, no system-tray feature). Style `fluent` (pure Slint). Slint is licensed GPL-3.0 or its - royalty-free license (attribution required) or a commercial one; pick one before distributing. + no femtovg, no system-tray feature). Style `fluent` (pure Slint). Slint is used under its + Royalty-free Desktop, Mobile, and Web Applications License 2.0, so Grove stays MIT. Its attribution + requirement is met by the `AboutSlint` widget on the About view (reachable from the sidebar); keep + that view if the UI is reorganised. - `ksni` 0.3.7 (`async-io` + `blocking`, no tokio). ## Memory (release build, KDE Plasma 6 / Wayland, `ps -o rss`)