Group language pack contents under collapsible headings

This commit is contained in:
Dandaedre 2026-11-17 14:13:29 +01:00
parent b922531337
commit 70553daff3
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
5 changed files with 22 additions and 7 deletions

2
Cargo.lock generated
View File

@ -548,7 +548,7 @@ dependencies = [
[[package]]
name = "canvas-pilot"
version = "0.9.23"
version = "0.9.24"
dependencies = [
"base64",
"craft-dwg",

View File

@ -4,7 +4,7 @@ default-members = ["crates/canvas-pilot"]
resolver = "3"
[workspace.package]
version = "0.9.23"
version = "0.9.24"
edition = "2024"
license = "MIT"
repository = "https://proxy.dandaedre.com/gitea/idle-org/canvas-pilot"

View File

@ -210,11 +210,16 @@ impl Editor {
}
for pack in packs {
ui.separator();
ui.label(format!("{} · revision {}", pack.id, pack.revision));
for language in &pack.languages {
ui.label(format!("{} — {}", language.native_name, language.name));
}
ui.push_id(&pack.id, |ui| {
egui::CollapsingHeader::new(
egui::RichText::new(format!("{} · revision {}", pack.id, pack.revision)).strong(),
)
.id_salt(("language-pack", &pack.id))
.default_open(true)
.show(ui, |ui| {
for language in &pack.languages {
ui.label(format!("{} — {}", language.native_name, language.name));
}
ui.add_space(4.0);
if ui.button(tr(&ctx, "language.remove-pack")).clicked() {
self.finish_language_preview(&ctx, false);
self.language_pack_action = Some(PackAction::Remove(pack.clone()));

View File

@ -4,6 +4,12 @@
## Unreleased
### v0.9.24
- Group installed language packs under bold, collapsible ID/revision headings,
with languages and the removal action indented beneath their pack. Packs start
expanded and retain their open/closed state while browsing settings.
### v0.9.23
- Clicking High Contrast again restores the previous theme in the theme browser,

View File

@ -25,6 +25,10 @@ These packs reuse the fonts already bundled with Canvas Pilot. Version 1 and 2 p
contain translations only: they neither install fonts nor reduce the current
application download size. Ukrainian uses the existing Cyrillic coverage.
Installed packs appear under bold, collapsible headings showing the pack ID and
revision. Click a heading or its arrow to hide or show the indented language list
and **Remove pack…** action. Packs start expanded.
## Make your own pack
Download these three editable example files into the same folder: