From c482fb9c73fbe4b2dd2428f54d645ad67d36cd48 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 20 Aug 2025 09:20:01 -0500 Subject: [PATCH] add number of slides and items --- src/main.rs | 16 +++++++++++++++- src/ui/presenter.rs | 6 ++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 18205e1..9e2a6ce 100644 --- a/src/main.rs +++ b/src/main.rs @@ -488,7 +488,21 @@ impl cosmic::Application for App { } fn footer(&self) -> Option> { - Some(text::body("Sux").into()) + let total_items_text = + format!("Total Service Items: {}", self.service.len()); + let total_slides_text = + format!("Total Slides: {}", self.presenter.total_slides); + let row = row![ + text::body(total_items_text), + text::body(total_slides_text) + ] + .spacing(10); + Some( + Container::new(row) + .align_right(Length::Fill) + .padding([5, 0, 0, 0]) + .into(), + ) } fn subscription(&self) -> Subscription { diff --git a/src/ui/presenter.rs b/src/ui/presenter.rs index cd9b2d9..ad82797 100644 --- a/src/ui/presenter.rs +++ b/src/ui/presenter.rs @@ -50,6 +50,8 @@ pub(crate) struct Presenter { pub current_slide: Slide, pub current_item: usize, pub current_slide_index: usize, + pub absolute_slide_index: usize, + pub total_slides: usize, pub video: Option