File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -237,22 +237,16 @@ impl AppState {
237
237
Style :: new ( )
238
238
} ;
239
239
240
+ let title = format ! (
241
+ "Linux Toolbox - {} {}" ,
242
+ env!( "BUILD_DATE" ) ,
243
+ self . multi_select. then( || "[Multi-Select]" ) . unwrap_or( "" )
244
+ ) ;
245
+
240
246
// Create the list widget with items
241
247
let list = List :: new ( items)
242
- . highlight_style ( if let Focus :: List = self . focus {
243
- Style :: default ( ) . reversed ( )
244
- } else {
245
- Style :: new ( )
246
- } )
247
- . block ( Block :: default ( ) . borders ( Borders :: ALL ) . title ( format ! (
248
- "Linux Toolbox - {} {}" ,
249
- env!( "BUILD_DATE" ) ,
250
- if self . multi_select {
251
- "[Multi-Select]"
252
- } else {
253
- ""
254
- }
255
- ) ) )
248
+ . highlight_style ( style)
249
+ . block ( Block :: default ( ) . borders ( Borders :: ALL ) . title ( title) )
256
250
. scroll_padding ( 1 ) ;
257
251
frame. render_stateful_widget ( list, chunks[ 1 ] , & mut self . selection ) ;
258
252
You can’t perform that action at this time.
0 commit comments