@@ -87,10 +87,6 @@ pub fn new(hotkey: HotKey, config: &Config) -> (Tile, Task<Message>) {
8787
8888pub fn view ( tile : & Tile , wid : window:: Id ) -> Element < ' _ , Message > {
8989 if tile. visible {
90- let round_bottom_edges = match & tile. page {
91- Page :: Main | Page :: EmojiSearch => tile. results . is_empty ( ) ,
92- Page :: ClipboardHistory => tile. clipboard_content . is_empty ( ) ,
93- } ;
9490 let title_input = text_input ( tile. config . placeholder . as_str ( ) , & tile. query )
9591 . on_input ( move |a| Message :: SearchQueryChanged ( a, wid) )
9692 . on_paste ( move |a| Message :: SearchQueryChanged ( a, wid) )
@@ -99,7 +95,7 @@ pub fn view(tile: &Tile, wid: window::Id) -> Element<'_, Message> {
9995 . id ( "query" )
10096 . width ( Fill )
10197 . line_height ( LineHeight :: Relative ( 1.75 ) )
102- . style ( move |_, _| rustcast_text_input_style ( & tile. config . theme , round_bottom_edges ) )
98+ . style ( move |_, _| rustcast_text_input_style ( & tile. config . theme ) )
10399 . padding ( 20 ) ;
104100
105101 let scrollbar_direction = if tile. config . theme . show_scroll_bar {
@@ -120,8 +116,6 @@ pub fn view(tile: &Tile, wid: window::Id) -> Element<'_, Message> {
120116 tile. config . theme . clone ( ) ,
121117 tile. focus_id ,
122118 )
123- } else if tile. results . is_empty ( ) {
124- space ( ) . into ( )
125119 } else if tile. page == Page :: EmojiSearch {
126120 emoji_page (
127121 tile. config . theme . clone ( ) ,
@@ -157,14 +151,26 @@ pub fn view(tile: &Tile, wid: window::Id) -> Element<'_, Message> {
157151 . id ( "results" )
158152 . height ( height as u32 ) ;
159153
154+ let text = if !tile. query_lc . is_empty ( ) {
155+ if results_count == 1 {
156+ "1 result found" . to_string ( )
157+ } else if results_count == 0 {
158+ "No results found" . to_string ( )
159+ } else {
160+ format ! ( "{results_count} results found" )
161+ }
162+ } else {
163+ String :: from ( "♥️ Rustcast" )
164+ } ;
165+
160166 let contents = container (
161167 Column :: new ( )
162168 . push ( title_input)
163169 . push ( scrollable)
164170 . push ( footer (
165171 tile. config . theme . clone ( ) ,
166- results_count,
167172 tile. current_mode . clone ( ) ,
173+ text,
168174 ) )
169175 . spacing ( 0 ) ,
170176 )
@@ -179,27 +185,15 @@ pub fn view(tile: &Tile, wid: window::Id) -> Element<'_, Message> {
179185 ..Default :: default ( )
180186 } ) ;
181187
182- container ( contents. clip ( false ) )
188+ container ( contents)
183189 . style ( |_| contents_style ( & tile. config . theme ) )
184190 . into ( )
185191 } else {
186192 space ( ) . into ( )
187193 }
188194}
189195
190- fn footer ( theme : Theme , results_count : usize , current_mode : String ) -> Element < ' static , Message > {
191- if results_count == 0 {
192- return space ( ) . into ( ) ;
193- }
194-
195- let text = if results_count == 1 {
196- "1 result found" . to_string ( )
197- } else {
198- format ! ( "{results_count} results found" )
199- } ;
200-
201- // “Liquid glass” parameters (match your other styles)
202- let focused = false ;
196+ fn footer ( theme : Theme , current_mode : String , text : String ) -> Element < ' static , Message > {
203197 let radius = 15.0 ;
204198
205199 let current_mode = format ! (
@@ -215,6 +209,7 @@ fn footer(theme: Theme, results_count: usize, current_mode: String) -> Element<'
215209 . height ( 30 )
216210 . color ( theme. text_color ( 0.7 ) )
217211 . font ( theme. font ( ) )
212+ . align_y ( Alignment :: Center )
218213 . align_x ( Alignment :: Center ) ,
219214 )
220215 . push (
@@ -224,24 +219,28 @@ fn footer(theme: Theme, results_count: usize, current_mode: String) -> Element<'
224219 . color ( theme. text_color ( 0.7 ) )
225220 . font ( theme. font ( ) )
226221 . width ( Fill )
222+ . align_y ( Alignment :: Center )
227223 . align_x ( Alignment :: End ) ,
228224 )
225+ . align_y ( Alignment :: Center )
229226 . padding ( 4 )
230227 . width ( Fill )
231- . height ( 30 ) ,
228+ . height ( Fill ) ,
232229 )
230+ . align_y ( Alignment :: Center )
233231 . center ( Length :: Fill )
234232 . width ( WINDOW_WIDTH )
235233 . padding ( 5 )
234+ . height ( 30 )
236235 . style ( move |_| container:: Style {
237236 text_color : None ,
238237 background : Some ( iced:: Background :: Color ( glass_surface (
239238 theme. bg_color ( ) ,
240- focused ,
239+ false ,
241240 ) ) ) ,
242241 border : iced:: Border {
243- color : glass_border ( theme. text_color ( 1.0 ) , focused ) ,
244- width : 1.0 ,
242+ color : glass_border ( theme. text_color ( 1.0 ) , false ) ,
243+ width : 0. ,
245244 radius : Radius :: new ( radius) . top ( 0.0 ) ,
246245 } ,
247246
0 commit comments