From c4738ad2c852b9191d83ac36003429bd2beff74e Mon Sep 17 00:00:00 2001 From: electria Date: Mon, 27 Jul 2026 21:37:00 -0700 Subject: [PATCH] feat: display image dimensions in title --- src/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.rs b/src/main.rs index 59b4151..62f5087 100644 --- a/src/main.rs +++ b/src/main.rs @@ -170,11 +170,18 @@ impl State { fn subscription(&self) -> Subscription { event::listen().map(Message::Event) } + fn title(&self) -> String { + match self.image.as_ref() { + Some(image) => format!("imagey {}x{}", image.width(), image.height()), + None => format!("imagey"), + } + } } fn main() -> Result<(), iced::Error> { iced::application(State::new, State::update, State::view) .subscription(State::subscription) + .title(State::title) .theme(Theme::custom( "custom", theme::Palette {