authorgravatar for git@paperclover.netclover caruso <git@paperclover.net> 2026-10-03 01:42:14-07:00
committergravatar for git@paperclover.netclover caruso <git@paperclover.net> 2026-10-03 05:19:31-07:00
log5c06254186b809c75c62d772681c40f0cb9152d4
tree07f377e22aad3f08eb5da89efe42b7f0ebb272eb
parent85d15e3b338fc25a2a0802e7893bc82e48090d57
signature Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU

fix: the Themes dialog rules off its own themes from the built-in ones, without the note on editing a copy

Assisted-by: claude-opus-5.5

1 files changed, 23 insertions(+), 13 deletions(-)

crates/snowbound/src/themes.rs+23-13
......@@ -203,11 +203,11 @@ impl State {
203203 section: Option<u32>,
204204 ) {
205205 let mut all = library.themes().all();
206 // A retired built-in worn here is listed while it is.
206 // A retired built-in worn here is listed with the others while it is.
207207 if let Some(wearing) = &wearing
208208 && !all.contains(wearing)
209209 {
210 all.push(wearing.clone());
210 all.insert(built_in().len(), wearing.clone());
211211 }
212212 let selected = wearing
213213 .and_then(|wearing| all.iter().position(|theme| theme.id == wearing.id))
......@@ -296,6 +296,26 @@ impl State {
296296 },
297297 );
298298 for (index, listed) in dialog.themes.iter().enumerate() {
299 let own = !stored::is_built_in(&listed.id);
300 if own && (index == 0 || stored::is_built_in(&dialog.themes[index - 1].id)) {
301 ui.open(
302 "rule",
303 Spec {
304 size: [fill(), px(7.0)],
305 pad: [4.0, 3.0],
306 ..Spec::default()
307 },
308 );
309 ui.leaf(
310 "line",
311 Spec {
312 size: [fill(), fill()],
313 fill: Some(theme.chip),
314 ..Spec::default()
315 },
316 );
317 ui.close();
318 }
299319 let shown = index == dialog.selected;
300320 let item = ui.open(
301321 ("theme", index),
......@@ -357,17 +377,7 @@ impl State {
357377 ..Spec::default()
358378 },
359379 );
360 if built {
361 ui.leaf(
362 "locked",
363 Spec {
364 size: [fill(), px(row * 1.5)],
365 text: Some("Changing a built-in theme edits a copy."),
366 color: Some(theme.text_dim),
367 ..Spec::default()
368 },
369 );
370 } else {
380 if !built {
371381 let edited = &mut dialog.themes[dialog.selected];
372382 let before = edited.name.clone();
373383 ui::text_field(