Keep theme picker open while previewing themes
Gitea/canvas-pilot/pipeline/head This commit looks good Details

This commit is contained in:
Dandaedre 2026-11-17 14:06:05 +01:00
parent a1425f78c6
commit 8c3ab04bf4
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
5 changed files with 16 additions and 9 deletions

2
Cargo.lock generated
View File

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

View File

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

View File

@ -263,7 +263,6 @@ impl Editor {
});
if let Some(choice) = selected {
choice.apply(ctx);
self.themes_open = false;
self.settings.save(&self.application_settings(ctx));
}
}
@ -524,13 +523,14 @@ mod tests {
let ctx = egui::Context::default();
let boxes = app.layout.layers().clone();
let formats = app.layout.formats().clone();
click_label(&mut app, &ctx, "Menu");
click_label(&mut app, &ctx, "Options");
let label = format!("Theme: {}", theme::Theme::current(&ctx).name());
click_label(&mut app, &ctx, &label);
click_label(&mut app, &ctx, "More themes…");
for choice in theme::Theme::ALL {
click_label(&mut app, &ctx, "Menu");
click_label(&mut app, &ctx, "Options");
let label = format!("Theme: {}", theme::Theme::current(&ctx).name());
click_label(&mut app, &ctx, &label);
click_label(&mut app, &ctx, "More themes…");
click_label(&mut app, &ctx, choice.name());
assert!(app.themes_open);
assert!(theme::Theme::current(&ctx) == choice);
assert_eq!(ctx.global_style().visuals.dark_mode, !choice.is_light());
let output = frame(&mut app, &ctx, vec![]);

View File

@ -4,6 +4,11 @@
## Unreleased
### v0.9.21
- Keep the More themes picker open after each selection so multiple themes can
be previewed before closing it. Each choice still applies and saves immediately.
### v0.9.20
- Added a full-width No folder drop area and widened the heading drop target to

View File

@ -108,7 +108,9 @@ used themes, newest first. **More themes…** opens the complete picker with col
swatches: Midra Dark plus all 18 themes from the SOTV song-database theme folder.
A fresh installation lists only Midra Dark until other themes are selected.
Selecting a theme updates the UI and viewport immediately and saves the recent
history across restarts. Reusing a theme moves it to the top without duplicates.
history across restarts. The picker stays open so you can try several themes;
close it with its window close button when finished. Reusing a theme moves it to
the top without duplicates.
Closing the picker without choosing leaves the theme and history unchanged.
The viewport, grid, layer boxes and source test patterns use the selected palette;