Preset menus: say they are PhotoCraft's own presets

FredApps on #9282 (changes requested): the menus showed familiar preset
names with PhotoCraft's own settings and nothing in the product said so.
The caption now reads "PhotoCraft Preset:", and its tooltip says these
are PhotoCraft's settings for the looks, not Photoshop's presets of the
same names. The preview, one-step history and Custom detection are
unchanged.

Test: preset_menus_say_they_are_photocrafts_own

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hector VillarrealandClaude Opus 5.5 committed 2026-10-25 20:54:58 -06:00
1 parent bcbf693cf6
commit c47a8a4967
2 files changed
+19 -1

No files matched your search

+5 -1
View File
@@ -126,7 +126,11 @@ fn preset_row(ui: &mut egui::Ui, kind: &str, v: &mut Value, cx: &EditorCx) -> Ed
}
let mut e = Edit::default();
ui.horizontal(|ui| {
label(ui, tl!("Preset:"));
// The collection is PhotoCraft's own (adjust_presets): the caption says so, so a tutorial's
// preset of the same name isn't taken for this one.
let t = Tokens::get(ui.ctx());
ui.label(RichText::new(tl!("PhotoCraft Preset:")).color(t.text_dim).size(12.0))
.on_hover_text(tl!("PhotoCraft's own settings for these looks, not Photoshop's presets of the same names."));
let current = crate::adjust_presets::matching(kind, v, cx.gray).map_or("custom", |p| p.id);
let mut options: Vec<(&str, &str)> = list.iter().map(|p| (p.id, tl!(p.label))).collect();
if current == "custom" {
@@ -943,3 +943,17 @@ fn properties_preset_menus_load_every_setting_in_one_step() {
assert_eq!(h.state().session.active().unwrap().history.past_len(), steps + 1, "{kind}: one step");
}
}
/// FredApps on #9282: the menu says these are PhotoCraft's own presets, not Photoshop's presets of
/// the same names (whose settings differ), so a tutorial's "Increase Contrast 1" isn't mistaken
/// for this one.
#[test]
fn preset_menus_say_they_are_photocrafts_own() {
for kind in ["levels", "exposure", "blackWhite", "channelMixer"] {
let mut h = app_harness(kind, "rgb", 8);
let caption = h.get_by_label("PhotoCraft Preset:");
caption.hover();
h.run_steps(30);
assert!(h.query_by_label_contains("not Photoshop's presets").is_some(), "{kind}: the caption explains the presets are PhotoCraft's own");
}
}