mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Panels: review follow-ups to the shared docking and egui 0.37 merges (#9575)
This commit is contained in:
1 parent
6a199e224f
commit
b078e0e8a6
5 files changed
+7
-5
No files matched your search
@@ -797,7 +797,7 @@ pub fn show(app: &mut PhotocraftApp, ctx: &egui::Context) {
|
||||
let opts: Vec<(String, &str)> = options.iter().cloned().zip(labels.iter().map(String::as_str)).collect();
|
||||
ui.horizontal(|ui| {
|
||||
ui.label(egui::RichText::new(tl!(&label)).color(t.text_dim));
|
||||
widgets::dropdown(ui, &format!("gallery-{}", p.key), &label, &mut c, &opts, 140.0);
|
||||
widgets::dropdown(ui, &format!("gallery-{}", p.key), tl!(&label), &mut c, &opts, 140.0);
|
||||
});
|
||||
e.params.insert(p.key, json!(c));
|
||||
}
|
||||
|
||||
@@ -1058,7 +1058,7 @@ pub fn body(app: &mut PhotocraftApp, ui: &mut egui::Ui, f: &mut Map<String, Valu
|
||||
let opts: Vec<(String, &str)> =
|
||||
photocraft_color::BlendMode::LAYER_MODES.iter().map(|m| (m.label().to_string(), m.label())).collect();
|
||||
// One id per mode: Bevel & Emboss has two (Highlight, Shadow), which must not share a list (#9368).
|
||||
if widgets::dropdown(ui, &format!("fx-blend-{sel_kind}-{key}"), tl!("Blend Mode"), &mut cur, &opts, 150.0) {
|
||||
if widgets::dropdown(ui, &format!("fx-blend-{sel_kind}-{key}"), tl!(&label), &mut cur, &opts, 150.0) {
|
||||
let value = json!(cur);
|
||||
disp[key] = value.clone();
|
||||
set_param(f, &selected, key, value);
|
||||
|
||||
@@ -670,8 +670,9 @@ layer names. Selection is captured before opening the dialog; an unselected laye
|
||||
## Shared panel docking
|
||||
|
||||
Panel arrangements support tab grouping and reordering, horizontal and vertical splits,
|
||||
and movable, resizable floating groups inside the application window. Drag a panel tab or a
|
||||
group's drag bar, or use its context menu. Floating groups remain within the application viewport.
|
||||
and movable, resizable floating groups. Drag a panel tab or a group's drag bar, or use its
|
||||
context menu. On the desktop a floating group opens in its own OS window; on Wayland, in the
|
||||
web build and for the Studio Properties card it stays inside the application window.
|
||||
|
||||
The shared layout begins with the existing workspace on the first docking operation.
|
||||
Workspace saves keep its groups, active tabs, split sizes, floating geometry, and the
|
||||
|
||||
@@ -652,7 +652,7 @@ A forced hidden paint (`RequestPaintWhileHidden`) runs the normal UI phase.
|
||||
| Control requests, synthetic input queue | `logic` `drain_control`; `raw_input_hook` `take_synthetic_step` | Keep the queue in logic. `take_synthetic_step` may consume on a hidden logic tick, so set `synthetic_in_flight` in the hook, send `RequestPaintWhileHidden` from `logic` until a real UI pass consumes the preserved events, and clear the flag in `App::ui` after that pass. Do not use the end of `ui` as the only wake. |
|
||||
| Screenshots | `logic` issue/collect | Keep in logic; bounded slot; the screenshot command itself requests paint while hidden, so a hidden screenshot pass is not evidence that synthetic input would have woken the app. Use rendered-frame identity + monotonic settle deadline. |
|
||||
| Job polling | `jobs_ui::tick` in logic; `jobs_ui::keep_polling` at end of ui | Move `keep_polling` to logic or call from both. Consume job results by revision/sequence exactly once per pass; a repeated pass must not re-apply a result. |
|
||||
| Autosave/recovery | `format::Autosaver` background thread; `on_exit` saves tool memory | Use `std::time::Instant` (or `web_time::Instant`) for intervals and deadlines, never `ctx.input(|i| i.time)` in logic. Ensure `on_exit` runs for both renderers. |
|
||||
| Autosave/recovery | `format::Autosaver` background thread; `on_exit` saves tool memory | Use `std::time::Instant` (or `web_time::Instant`) for intervals and deadlines, never `ctx.input(\|i\| i.time)` in logic. Ensure `on_exit` runs for both renderers. |
|
||||
| Preferences/theme/fonts | `logic` syncs language and calls `install_fonts`; `ui` applies theme on first frame | Keep setup in `setup_context` when possible; `logic` must finish setup if the creator did not. |
|
||||
| File drops | `logic` drains OS/web inboxes and dropped files | Keep; `RequestPaintWhileHidden` when a drop arrives with no visible frame. |
|
||||
| Native menu | `logic` runs menu; `ui` syncs it | `native_menu::sync` is UI-dependent; leave in ui, but queue menu events for the next paint. |
|
||||
|
||||
@@ -50,6 +50,7 @@ modules:
|
||||
- cargo --offline build --release --locked -p photocraft --features heif
|
||||
- install -Dm755 target/release/photocraft /app/bin/photocraft
|
||||
- install -Dm644 NOTICE /app/share/doc/photocraft/NOTICE
|
||||
- install -Dm644 ATTRIBUTION.md /app/share/doc/photocraft/ATTRIBUTION.md
|
||||
- install -Dm644 packaging/linux/ai.storyteller.photocraft.desktop /app/share/applications/ai.storyteller.photocraft.desktop
|
||||
- install -Dm644 packaging/linux/ai.storyteller.photocraft.mime.xml /app/share/mime/packages/ai.storyteller.photocraft.xml
|
||||
- mkdir -p /app/share/icons && cp -R assets/app-icon/hicolor /app/share/icons/
|
||||
|
||||
Reference in new issue
Block a user