856f865cf98d
adjustments.rs
//! The Adjustments panel: a grid of one-click adjustment layers.
use craft::imaging::ui::adjust::AdjustmentsPanel;
use serde_json::json;
use crate::PhotocraftApp;
/// The Adjustments panel body: every adjustment kind, in the framework's order. A pick adds that
/// adjustment layer; the command brings Properties forward to edit it. The pick is the pass's own
/// click, so a rerun pass of the frame adds no second layer.
pub(crate) fn panel(app: &mut PhotocraftApp, ui: &mut egui::Ui) {
let Some(kind) = AdjustmentsPanel::new(tl!("Adjustments")).show(ui).picked else { return };
let _ = app.run(&format!("layer.newAdjustmentLayer.{}", kind.key()), json!({}));
}
No file is open. Choose one in the tree, or press Ctrl+O (⌘O on a Mac) to find one by name.
Syntax highlighting could not load. The unmodified read-only text remains available above.