@@ -141,13 +141,13 @@ impl<'a> App<'a> {
141141 let rects = Layout :: default ( )
142142 . direction ( Direction :: Vertical )
143143 . constraints ( [ Constraint :: Percentage ( 100 ) ] . as_ref ( ) )
144- . split ( frame. size ( ) ) ;
144+ . split ( frame. area ( ) ) ;
145145
146146 frame. render_widget ( paragraph, rects[ 0 ] ) ;
147147 }
148148
149149 fn render_main_page ( & mut self , frame : & mut Frame < ' _ > ) {
150- let height = frame. size ( ) . height ;
150+ let height = frame. area ( ) . height ;
151151 let rects = Layout :: default ( )
152152 . direction ( Direction :: Vertical )
153153 . constraints (
@@ -159,7 +159,7 @@ impl<'a> App<'a> {
159159 . as_ref ( ) ,
160160 )
161161 . margin ( 2 )
162- . split ( frame. size ( ) ) ;
162+ . split ( frame. area ( ) ) ;
163163
164164 let search_bar_title = "Press CTRL + F to search a code..." ;
165165 let search_bar = Paragraph :: new ( & * self . search_query )
@@ -207,7 +207,7 @@ impl<'a> App<'a> {
207207 . block ( block)
208208 . alignment ( Alignment :: Center )
209209 . wrap ( Wrap { trim : true } ) ;
210- let area = centered_rect ( self . popup . percent_x , self . popup . percent_y , frame. size ( ) ) ;
210+ let area = centered_rect ( self . popup . percent_x , self . popup . percent_y , frame. area ( ) ) ;
211211 frame. render_widget ( Clear , area) ;
212212 //this clears out the background
213213 frame. render_widget ( paragraph, area) ;
@@ -305,6 +305,6 @@ impl<'a> App<'a> {
305305 }
306306
307307 fn is_large_application ( & self , frame : & mut Frame < ' _ > ) -> bool {
308- frame. size ( ) . width >= LARGE_APPLICATION_WIDTH
308+ frame. area ( ) . width >= LARGE_APPLICATION_WIDTH
309309 }
310310}
0 commit comments