@@ -63,12 +63,14 @@ impl DrawableComponent for RemoteListPopup {
63
63
let chunks = Layout :: default ( )
64
64
. direction ( Direction :: Vertical )
65
65
. constraints ( vec ! [
66
- Constraint :: Percentage ( 50 ) ,
67
- Constraint :: Percentage ( 50 ) ,
66
+ Constraint :: Min ( 1 ) ,
67
+ Constraint :: Length ( 1 ) ,
68
+ Constraint :: Length ( 2 ) ,
68
69
] )
69
70
. split ( area) ;
70
71
self . draw_remotes_list ( f, chunks[ 0 ] ) ?;
71
- self . draw_selected_remote_details ( f, chunks[ 1 ] ) ;
72
+ self . draw_separator ( f, chunks[ 1 ] ) ;
73
+ self . draw_selected_remote_details ( f, chunks[ 2 ] ) ;
72
74
}
73
75
Ok ( ( ) )
74
76
}
@@ -290,20 +292,17 @@ impl RemoteListPopup {
290
292
Ok ( ( ) )
291
293
}
292
294
293
- fn draw_selected_remote_details ( & self , f : & mut Frame , r : Rect ) {
295
+ fn draw_separator ( & self , f : & mut Frame , r : Rect ) {
294
296
f. render_widget (
295
297
Block :: default ( )
296
298
. title ( strings:: POPUP_SUBTITLE_REMOTES )
297
299
. border_type ( BorderType :: Plain )
298
300
. borders ( Borders :: TOP ) ,
299
301
r,
300
302
) ;
303
+ }
301
304
302
- let area = r. inner ( Margin {
303
- vertical : 1 ,
304
- horizontal : 0 ,
305
- } ) ;
306
-
305
+ fn draw_selected_remote_details ( & self , f : & mut Frame , r : Rect ) {
307
306
let remote =
308
307
self . remote_names . get ( usize:: from ( self . selection ) ) ;
309
308
if let Some ( remote) = remote {
@@ -324,7 +323,7 @@ impl RemoteListPopup {
324
323
Paragraph :: new ( Text :: from ( lines) )
325
324
. alignment ( Alignment :: Left )
326
325
. wrap ( Wrap { trim : true } ) ,
327
- area ,
326
+ r ,
328
327
) ;
329
328
330
329
let mut r = r;
0 commit comments