From 85e079655939dfb4e1f3f9df6d7326b9b69d48a9 Mon Sep 17 00:00:00 2001 From: zitann2020 Date: Sat, 31 Oct 2026 22:27:55 +0900 Subject: [PATCH] ui: a category lists its effects by name, as After Effects does Co-Authored-By: DeepSeek V4.1 Flash --- crates/ui-egui/src/panels/effects_presets.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/panels/effects_presets.rs b/crates/ui-egui/src/panels/effects_presets.rs index 1ee34b4b1..db2e4d83e 100644 --- a/crates/ui-egui/src/panels/effects_presets.rs +++ b/crates/ui-egui/src/panels/effects_presets.rs @@ -760,10 +760,13 @@ pub fn show(app: &mut EffectcraftApp, ui: &mut egui::Ui, rect: Rect) { let mut cats: Vec<&str> = effectcraft_engine::effects::categories(); cats.retain(|c| reg.iter().any(|e| e.category == *c)); for cat in cats { - let items: Vec<_> = reg.iter().filter(|e| e.category == cat && keep(e)).collect(); + let mut items: Vec<_> = reg.iter().filter(|e| e.category == cat && keep(e)).collect(); if items.is_empty() { continue; } + // After Effects lists a category by the effect's English name, whatever the interface + // language draws; the registry's own order is packing order, which reads as random. + items.sort_by_key(|e| e.name.to_lowercase()); // The folder draws the category in the interface language; `cat` stays the key (the // open/closed state and the automation id are the registry's English name). if !folder_row(app, ui, &lp, list, &mut y, &mut nav, cat, &crate::i18n::effects::category(cat), 1, 0.0, searching, None) {