mirror of
https://github.com/storytold/deckcraft.git
synced 2026-12-01 10:47:56 +01:00
app red round 4 merge: remove the DIAG prints the fixers left
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d7f7636917
commit
71486f44a4
6 files changed
-31
No files matched your search
@@ -180,13 +180,6 @@ pub(crate) fn show(app: &mut SlideApp, ui: &mut egui::Ui, space: &CanvasSpace) {
|
||||
};
|
||||
let (mut image, mut drawn) = render(region);
|
||||
picture.canvas_renders += 1;
|
||||
eprintln!(
|
||||
"DIAG the_picture_renders_again_only_when_its_revision_changes: render {} pass {} size {size:?} scale {scale} region {region:?} anim {} edit {editing_text:?} gifs {}",
|
||||
picture.canvas_renders,
|
||||
ui.ctx().current_pass_index(),
|
||||
anim_key(anim),
|
||||
crate::media::gif_key(&gifs)
|
||||
);
|
||||
// Text can spill beyond its box. Store the expanded region's revision so the next
|
||||
// pass reuses it, rather than repeating the first, too-small render.
|
||||
let expanded = region_for(source.estimate.union(source.drawn).union(drawn));
|
||||
|
||||
@@ -19,18 +19,14 @@ fn drag_with_modifiers(h: &mut Harness<'_, SlideApp>, a: Pos2, b: Pos2, modifier
|
||||
h.hover_at(a);
|
||||
h.run_steps(1);
|
||||
let editing = |h: &Harness<'_, SlideApp>| h.state().session.active().unwrap().selection.text.is_some();
|
||||
eprintln!("DIAG drag_indents_add_move_and_remove_tabs_on_the_ruler: before press at {a:?} editing {}", editing(h));
|
||||
h.event(egui::Event::PointerButton { pos: a, button: PointerButton::Primary, pressed: true, modifiers });
|
||||
h.run_steps(1);
|
||||
eprintln!("DIAG drag_indents_add_move_and_remove_tabs_on_the_ruler: after press editing {} status {:?}", editing(h), h.state().status);
|
||||
for i in 1..=8 {
|
||||
h.event(egui::Event::PointerMoved(a + (b - a) * (i as f32 / 8.0)));
|
||||
h.run_steps(1);
|
||||
}
|
||||
eprintln!("DIAG drag_indents_add_move_and_remove_tabs_on_the_ruler: after moves editing {}", editing(h));
|
||||
h.event(egui::Event::PointerButton { pos: b, button: PointerButton::Primary, pressed: false, modifiers });
|
||||
h.run_steps(2);
|
||||
eprintln!("DIAG drag_indents_add_move_and_remove_tabs_on_the_ruler: after release editing {} status {:?}", editing(h), h.state().status);
|
||||
h.event(egui::Event::ModifiersChanged(Modifiers::NONE));
|
||||
}
|
||||
|
||||
|
||||
@@ -148,11 +148,6 @@ pub(crate) fn open(app: &SlideApp, ctx: &egui::Context, params: &Value) -> Hoste
|
||||
Row::new().show(ui, |ui, _| {
|
||||
let can_pick = Host::of(ui).files().can_pick();
|
||||
let add = Button::new("Add Pictures…").enabled(can_pick).tooltip("Pass pictures to insert.photoAlbum").show(ui);
|
||||
eprintln!(
|
||||
"DIAG create_inserts_the_album_in_one_step: pass {} can_pick {can_pick} clicked {}",
|
||||
ui.ctx().current_pass_index(),
|
||||
clicked(&add)
|
||||
);
|
||||
if clicked(&add) {
|
||||
context.request_action("addPictures");
|
||||
}
|
||||
@@ -316,7 +311,6 @@ fn append_picture(dialog: &mut HostedParamDialog, name: &str, bytes: &[u8], tota
|
||||
pub(crate) fn each_pass(app: &mut SlideApp, _ctx: &egui::Context, dialog: &mut HostedParamDialog) {
|
||||
let files = app.host.files();
|
||||
let actions = dialog.take_actions();
|
||||
eprintln!("DIAG create_inserts_the_album_in_one_step: each_pass actions {actions:?} pick {:?}", app.dialogs.album_pick.is_some());
|
||||
for action in actions {
|
||||
if action == "addPictures" && app.dialogs.album_pick.is_none() {
|
||||
if files.can_pick() {
|
||||
|
||||
@@ -148,7 +148,6 @@ impl AutoCorrectForm {
|
||||
TextField::new(Word::plain("Replace"), Bind::bound(&mut *from)).show(ui);
|
||||
TextField::new(Word::plain("With"), Bind::bound(&mut *to)).show(ui);
|
||||
let add = Button::new(Word::plain("Add")).enabled(!from.trim().is_empty()).show(ui).clicks;
|
||||
eprintln!("DIAG autocorrect_list_edits_survive_nested_and_preferences_cancel: from {from:?} add clicks {add}");
|
||||
if add > 0 {
|
||||
actions.push(json!({ "add": [from.trim(), to] }));
|
||||
from.clear();
|
||||
@@ -416,7 +415,6 @@ pub(crate) fn open_autocorrect(app: &mut SlideApp, ctx: &Context, host: &mut Dia
|
||||
/// Applies live settings and restores opening values for every external or window Cancel path.
|
||||
pub(crate) fn pump(app: &mut SlideApp, _ctx: &Context, host: &mut DialogHost) {
|
||||
for action in host.take_actions(dialog_id("preferences")) {
|
||||
eprintln!("DIAG autocorrect_list_edits_survive_nested_and_preferences_cancel: action {action}");
|
||||
match app.run("text.autocorrect", action) {
|
||||
Ok(reply) => {
|
||||
if let Some(form) = host.get_mut::<PreferencesDialog>().and_then(|dialog| dialog.autocorrect.as_mut()) {
|
||||
|
||||
@@ -34,7 +34,6 @@ pub enum Target {
|
||||
/// Arms one pick-mode tool over a snapshot of the active slide.
|
||||
pub fn arm(app: &mut SlideApp, target: Target) {
|
||||
let Some(d) = app.session.active() else { return };
|
||||
eprintln!("DIAG set_transparent_color_takes_the_colour_clicked_in_the_picture: arm target {:?}", d.selection.target);
|
||||
if d.selection.target != deckcraft_engine::Target::Slides {
|
||||
app.set_status("The Eyedropper takes colours from a slide");
|
||||
return;
|
||||
@@ -69,12 +68,6 @@ pub fn after_pass(app: &mut SlideApp, ctx: &Context, mut tool: DropperTool<'stat
|
||||
// A press outside the canvas disarms, as production did.
|
||||
let outside =
|
||||
!armed.fresh && ctx.input(|i| i.pointer.primary_pressed() && i.pointer.hover_pos().is_some_and(|pos| !canvas_rect.contains(pos)));
|
||||
eprintln!(
|
||||
"DIAG set_transparent_color_takes_the_colour_clicked_in_the_picture: after_pass pass {} fresh {} outside {outside} ended {}",
|
||||
ctx.current_pass_index(),
|
||||
armed.fresh,
|
||||
tool.ended()
|
||||
);
|
||||
armed.fresh = false;
|
||||
if outside {
|
||||
ctx.request_repaint();
|
||||
|
||||
@@ -55,11 +55,6 @@ fn pick_hex(h: &mut Harness<'_, SlideApp>, button: &str, hex: &str) {
|
||||
h.run_steps(2);
|
||||
}
|
||||
h.run_steps(2);
|
||||
eprintln!(
|
||||
"DIAG shape_pattern_fill_keeps_preset_and_system_colors: opener {button} at {opener:?} hex fields {} openers {}",
|
||||
h.query_all_by_label("More Colors…").count(),
|
||||
h.query_all_by_role_and_label(Role::Button, button).count()
|
||||
);
|
||||
h.get_by_role_and_label(Role::TextInput, "More Colors…").click();
|
||||
h.run_steps(1);
|
||||
for pressed in [true, false] {
|
||||
|
||||
Reference in new issue
Block a user