fix(shell): the Frame Picker's controls fit the narrowest dock; layer.set_properties answers one layer as before (M7)

This commit is contained in:
Tanish Manku committed 2026-11-28 18:36:29 -07:00
1 parent 99bdd029a7
commit 040e18d230
4 files changed
+12 -5

No files matched your search

+5 -2
View File
@@ -54,7 +54,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Layer Properties",
"Modify/Timeline",
None,
"{layer? | layers?: [ids] (default: every layer selected in the layer list), name? (one layer only), type?: normal|mask|masked|guide|guided, mask?: coverage|alpha|luminance (a mask layer's mask type), color?, outline?: bool (view as outlines), height?: 100|200|300, opacity?: 0..100 (percent), visible?, locked?, onion?} sets several at once, on every one of the layers, as one undo step; answers with the first layer's properties and `layers`, the layers set. A layer's effects are layer.set_effects",
"{layer? | layers?: [ids] (default: every layer selected in the layer list), name? (one layer only), type?: normal|mask|masked|guide|guided, mask?: coverage|alpha|luminance (a mask layer's mask type), color?, outline?: bool (view as outlines), height?: 100|200|300, opacity?: 0..100 (percent), visible?, locked?, onion?} sets several at once, on every one of the layers, as one undo step; answers with the layer's properties (several layers: the first one's, and `layers`, the layers set). A layer's effects are layer.set_effects",
true,
set_properties,
),
@@ -229,7 +229,10 @@ fn set_properties(s: &mut Session, p: &Value) -> Result<Value> {
}
let first = ids.first().copied().ok_or_else(|| EngineError::State("no layer to set".into()))?;
let mut out = properties(s, first)?;
out["layers"] = json!(ids.iter().map(|l| l.0).collect::<Vec<_>>());
// One layer answers as it always has; several also say which were set.
if several {
out["layers"] = json!(ids.iter().map(|l| l.0).collect::<Vec<_>>());
}
Ok(out)
}
+1 -1
View File
@@ -171,7 +171,7 @@ This page is generated from the command registry, so it always matches the versi
- **Mask** `layer.toggle_mask` · Modify › Timeline · changes the document
Parameters: `{layer?} turns the layer into a mask over the layer below, or back into a normal layer. A new mask is locked: unlocked, its edge shows on the stage in the layer colour, to pick and reshape it`
- **Layer Properties** `layer.set_properties` · Modify › Timeline · changes the document
Parameters: ``{layer? | layers?: [ids] (default: every layer selected in the layer list), name? (one layer only), type?: normal|mask|masked|guide|guided, mask?: coverage|alpha|luminance (a mask layer's mask type), color?, outline?: bool (view as outlines), height?: 100|200|300, opacity?: 0..100 (percent), visible?, locked?, onion?} sets several at once, on every one of the layers, as one undo step; answers with the first layer's properties and `layers`, the layers set. A layer's effects are layer.set_effects``
Parameters: ``{layer? | layers?: [ids] (default: every layer selected in the layer list), name? (one layer only), type?: normal|mask|masked|guide|guided, mask?: coverage|alpha|luminance (a mask layer's mask type), color?, outline?: bool (view as outlines), height?: 100|200|300, opacity?: 0..100 (percent), visible?, locked?, onion?} sets several at once, on every one of the layers, as one undo step; answers with the layer's properties (several layers: the first one's, and `layers`, the layers set). A layer's effects are layer.set_effects``
- **Remove Camera** `camera.remove` · Modify › Timeline · changes the document
Parameters: `{} (removes the camera layer and its moves; asks first when the camera is animated)`
- **Remove Parent** `layer.remove_parent` · Modify › Timeline · changes the document
+1 -1
View File
@@ -134,7 +134,7 @@ instance starts on has a heavier border and a filled caption.
* **All frames** or **Keyframes only**: a symbol drawn with one pose per keyframe shows one
picture per pose with Keyframes only. A dot marks the frames where a keyframe starts, and a
frame's label shows beside its number.
* **Pictures** or **List**, and **Size** for the pictures.
* **Pictures** or **List**, and a slider for the size of the pictures.
* **Pin** keeps the panel on this symbol when you select something else. A pick then goes to
that symbol's instance at the playhead.
+5 -1
View File
@@ -242,6 +242,9 @@ pub fn panel(app: &mut App, ui: &mut egui::Ui) {
.on_hover_text(tr!("Single frame holds the chosen frame; Loop and Play once play on from it"))
.set_name(tr!("Looping of the selected instance"));
}
});
// (A row of its own: it fits the narrowest dock.)
ui.horizontal_wrapped(|ui| {
crate::theme::checkbox(ui, &mut app.frame_picker.create_keyframe, tr!("Create keyframe")).on_hover_text(tr!("A pick makes a keyframe at the playhead first, so the frames before keep what they showed (lip-sync, pose to pose)"));
});
@@ -269,7 +272,8 @@ pub fn panel(app: &mut App, ui: &mut egui::Ui) {
});
if app.frame_picker.view == View::Thumbnails {
ui.horizontal(|ui| {
ui.label(tr!("Size"));
// The bar gives way to its number in a narrow dock.
ui.spacing_mut().slider_width = (ui.available_width() - 96.0).clamp(24.0, 140.0);
a11y::slider(ui, &mut app.frame_picker.size, SIZE, tr!("Picture size"), a11y::SliderLook { suffix: " px", max_decimals: Some(0), ..Default::default() }).on_hover_text(tr!("Smaller pictures fit more frames in view"));
});
}