Integration: the merged PRs import what they use (#1270) and use egui 0.37's wheel source and media clock (#1350)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-25 13:45:19 -04:00
co-authored by Claude Opus 5.5
parent d20b08e3af
commit 31cf44c2ff
6 changed files with 20 additions and 10 deletions
+3 -1
View File
@@ -5,7 +5,9 @@ use std::sync::Arc;
use deckcraft_model::anim::{ANIMATIONS, AnimClass, AnimStart, Animation, TextBuild, animation_info};
use serde_json::{Value, json};
use super::{CommandSpec, always, bad, bool_or, bool_param, cmd, has_selection, has_slide, id_param, ok, str_param, targets, usize_param};
use super::{
CommandSpec, always, bad, bool_or, bool_param, cmd, has_selection, has_slide, id_param, ok, opt_usize_param, str_param, targets, usize_param,
};
use crate::{Result, Session};
pub fn specs() -> Vec<CommandSpec> {
+2 -2
View File
@@ -11,8 +11,8 @@ use deckcraft_model::{Background, Fill, PhType, Presentation, Shape, ShapeId, de
use serde_json::{Value, json};
use super::{
CommandSpec, NO_ID_SPACE, always, bad, bool_or, bool_param, cmd, color_param, color_value, f64_param, has_doc, has_slide, ok, rect_param,
str_param, usize_param, with_param,
CommandSpec, NO_ID_SPACE, always, bad, bool_or, bool_param, cmd, color_param, color_value, f64_param, has_doc, has_slide, ok, opt_usize_param,
rect_param, str_param, usize_param, with_param,
};
use crate::{Result, Session, Target};
+2 -2
View File
@@ -5,8 +5,8 @@ use deckcraft_model::{Shape, ShapeKind, Table};
use serde_json::{Value, json};
use super::{
CommandSpec, bad, bool_or, bool_param, cmd, color_param, edit_shapes, f64_param, has_selection, has_slide, id_param, ok, str_param,
table_drawn_heights, usize_param, xfrm_of,
CommandSpec, bad, bool_or, bool_param, cmd, color_param, edit_shapes, f64_param, has_selection, has_slide, id_param, ok, opt_usize_param,
str_param, table_drawn_heights, xfrm_of,
};
use crate::{DocState, Result, Session};
+3 -3
View File
@@ -1,7 +1,7 @@
use super::{
Ctx, Fields, Fill, Image, Opts, PathMorph, Point, RENDERER, Rect, Region, RenderOpts, Renderer, Rgba, SlideFields, TextMorph, crop_dest,
dpi_for_scale, gif_frame, image_dpi, images, morph_path, morph_text, needs_filters, parse_path, pasteboard_region, place_slide, render_blend,
render_shapes, render_slide, render_slide_drawn, slide_extent, text_transform,
Ctx, Fields, Fill, Image, Opts, PathMorph, Point, RENDERER, Rect, Region, RenderOpts, Renderer, Rgba, ShapeState, SlideFields, TextMorph,
crop_dest, dpi_for_scale, gif_frame, image_dpi, images, morph_path, morph_text, needs_filters, parse_path, pasteboard_region, place_slide,
render_blend, render_shapes, render_slide, render_slide_drawn, slide_extent, text_transform,
};
use deckcraft_model::chart::{ChartType, Trendline, TrendlineType};
use deckcraft_model::style::ColorRef;
+2 -1
View File
@@ -763,7 +763,8 @@ mod tests {
let peak = buf.iter().fold(0.0f32, |m, s| m.max(s.abs()));
assert!(peak > 0.04, "the audio track sounds: peak {peak}");
assert!(host.videos.get(&id).is_some_and(|v| v.feed.is_none()), "VP8 opens no video feed");
host.tick(&egui::Context::default(), &mut s);
host.tick_clock(0.1, &mut s);
host.sync_video_textures(&egui::Context::default());
assert!(host.texture(id).is_none(), "no VP8 frame exists to show");
}
+8 -1
View File
@@ -2974,7 +2974,13 @@ mod tests {
#[test]
fn wheel_zoom_reads_only_the_wheel_with_ctrl_or_cmd() {
let wheel = |unit, y: f32, modifiers| egui::Event::MouseWheel { unit, delta: vec2(0.0, y), phase: egui::TouchPhase::Move, modifiers };
let wheel = |unit, y: f32, modifiers| egui::Event::MouseWheel {
unit,
delta: vec2(0.0, y),
phase: egui::TouchPhase::Move,
source: egui::MouseWheelSource::Wheel,
modifiers,
};
use egui::MouseWheelUnit::{Line, Point};
assert_eq!(wheel_zoom_lines(&[wheel(Line, 1.0, egui::Modifiers::CTRL)], 40.0), Some(1.0));
assert_eq!(wheel_zoom_lines(&[wheel(Line, -2.0, egui::Modifiers::COMMAND)], 40.0), Some(-2.0));
@@ -3011,6 +3017,7 @@ mod tests {
unit: egui::MouseWheelUnit::Line,
delta: vec2(0.0, y),
phase: egui::TouchPhase::Move,
source: egui::MouseWheelSource::Wheel,
modifiers,
});
harness.run_steps(40);