mirror of
https://github.com/storytold/deckcraft.git
synced 2026-12-01 10:47:56 +01:00
WIP red-app-r4-1: edits before the fixer was stopped (its job scope was capped at 4 GB); not built
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1eb1f03857
commit
836dc36bf1
2 files changed
+5
-6
No files matched your search
@@ -380,11 +380,11 @@ mod tests {
|
||||
let original_slide = data.slide;
|
||||
let mut h = popup_harness(data);
|
||||
h.run_steps(2);
|
||||
h.get_by_role_and_label(egui::accesskit::Role::Button, "Next").click();
|
||||
h.get_by_role_and_label(egui::accesskit::Role::Button, "Next ▶").click();
|
||||
h.run_steps(2);
|
||||
let next = Command::Run { command: ShowCommands::Next.id().into() };
|
||||
assert_eq!(h.state().sent, vec![next.clone()]);
|
||||
h.get_by_role_and_label(egui::accesskit::Role::Button, "Next").focus();
|
||||
h.get_by_role_and_label(egui::accesskit::Role::Button, "Next ▶").focus();
|
||||
h.run_steps(2);
|
||||
h.key_press(egui::Key::Space);
|
||||
h.run_steps(2);
|
||||
|
||||
@@ -106,13 +106,12 @@ pub(crate) fn sheet(ui: &mut Ui, slides: GridSource<'_>, current: usize, aspect:
|
||||
let hidden = matches!(&slides, GridSource::Deck { doc, .. } if doc.slides.get(index).is_some_and(|slide| slide.hidden));
|
||||
let template = if hidden { "{n} Hidden" } else { "{n}" };
|
||||
let label = env.words.get(Word::plain(template)).replace("{n}", &(index + 1).to_string());
|
||||
// The tile carries the slide's name; its picture is decoration.
|
||||
let picture = match &slides {
|
||||
GridSource::Deck { doc, thumbs, source } => {
|
||||
thumb_source::picture(label.clone(), ThumbKey::Slide(doc.slides[index].id), thumbs, source)
|
||||
}
|
||||
GridSource::Deck { doc, thumbs, source } => thumb_source::picture("", ThumbKey::Slide(doc.slides[index].id), thumbs, source),
|
||||
GridSource::Pictures(pictures) => {
|
||||
let texture = pictures[index];
|
||||
Picture::painter(label.clone(), thumb_aspect, move |cx, rect| {
|
||||
Picture::painter("", thumb_aspect, move |cx, rect| {
|
||||
cx.painter.image(texture.id, rect, texture.uv(), egui::Color32::WHITE);
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user