From a3a3ff8414d091007d4ad5947af2ba0bc267ed58 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 9 Sep 2025 14:47:12 -0500 Subject: [PATCH] moving search to a button for better popup --- src/main.rs | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 671f398..59576e3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -279,12 +279,7 @@ impl cosmic::Application for App { } fn header_center(&self) -> Vec> { - vec![search_input("Search...", "") - .on_input(|_| Message::None) - .on_submit(|_| Message::None) - .on_focus(Message::SearchFocus) - .width(1200) - .into()] + vec![] } fn header_end(&self) -> Vec> { @@ -302,6 +297,24 @@ impl cosmic::Application for App { }; let row = row![ + tooltip( + button::custom( + row!( + Container::new( + icon::from_name("search") + .scale(5) + .symbolic(true) + ) + .center_y(Length::Fill), + text::body("Search") + ) + .spacing(5), + ) + .class(cosmic::theme::style::Button::HeaderBar) + .on_press(Message::SearchFocus), + "Search Library", + TPosition::Bottom, + ), tooltip( button::custom( row!(