From 6b6ebc8c58c8f9a215348b4fe62d62480fb848a3 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 20 Nov 2024 15:51:48 -0600 Subject: [PATCH] using a different test file --- justfile | 2 +- src/main.rs | 52 ++------------------------------------------------ testypres.lisp | 3 +++ 3 files changed, 6 insertions(+), 51 deletions(-) create mode 100644 testypres.lisp diff --git a/justfile b/justfile index c70b6bd..c9394a8 100644 --- a/justfile +++ b/justfile @@ -2,7 +2,7 @@ default: just --list build: RUST_LOG=debug cargo build -run ui=' ' file='~/dev/lumina-iced/test_presentation.lisp': +run ui=' ' file='~/dev/lumina-iced/testypres.lisp': RUST_LOG=debug cargo run -- {{ui}} {{file}} clean: RUST_LOG=debug cargo clean diff --git a/src/main.rs b/src/main.rs index 5a415ba..76eef98 100644 --- a/src/main.rs +++ b/src/main.rs @@ -169,55 +169,7 @@ impl cosmic::Application for App { } }; - let initial_slide = SlideBuilder::new() - .background( - Background::try_from( - "/home/chris/vids/test/camprules2024.mp4", - ) - .unwrap(), - ) - .text("") - .font("Quicksand") - .font_size(50) - .text_alignment(TextAlignment::MiddleCenter) - .video_loop(true) - .video_start_time(0.0) - .video_end_time(0.0) - .build() - .expect("oops slide"); - - let second_slide = SlideBuilder::new() - .background( - Background::try_from("/home/chris/pics/frodo.jpg") - .unwrap(), - ) - .text("Hello") - .font("Quicksand") - .font_size(50) - .text_alignment(TextAlignment::MiddleCenter) - .video_loop(false) - .video_start_time(0.0) - .video_end_time(0.0) - .build() - .expect("oops slide"); - - let tetrary_slide = SlideBuilder::new() - .background( - Background::try_from("/home/chris/pics/wojaks/reddit_the_xenomorph_s bigass wojak folder/Chads/ChristianChad_x16_drawing.png") - .unwrap(), - ) - .text("Hello") - .font("Quicksand") - .font_size(50) - .text_alignment(TextAlignment::MiddleCenter) - .video_loop(false) - .video_start_time(0.0) - .video_end_time(0.0) - .build() - .expect("oops slide"); - - // let slides = - // vec![initial_slide.clone(), second_slide, tetrary_slide]; + let current_slide = slides[0].clone(); let presenter = Presenter::with_slides(slides.clone()); let mut app = App { presenter, @@ -226,7 +178,7 @@ impl cosmic::Application for App { file: PathBuf::default(), windows: vec![], slides, - current_slide: initial_slide, + current_slide, }; let command; diff --git a/testypres.lisp b/testypres.lisp new file mode 100644 index 0000000..0f78eb9 --- /dev/null +++ b/testypres.lisp @@ -0,0 +1,3 @@ +(slide :background (image :source "~/pics/frodo.jpg" :fit fill) + (text "This is frodo" :font-size 70)) +(slide (video :source "~/vids/test/camprules2024.mp4" :fit contain))