@@ -482,7 +482,7 @@ fn ui(f: &mut Frame, app: &App) {
482
482
// If only output, then no top and fill all with output
483
483
if let Mode :: OnlyOutput = app. mode {
484
484
let output_size = Fill ( 1 ) ;
485
- let vertical = Layout :: vertical ( [ Length ( 1 ) , output_size, Length ( 3 ) ] ) ;
485
+ let vertical = Layout :: vertical ( [ Length ( 2 ) , output_size, Length ( 3 ) ] ) ;
486
486
let [ title_area, output, input] = vertical. areas ( f. area ( ) ) ;
487
487
488
488
draw_title_area ( app, f, title_area) ;
@@ -494,7 +494,7 @@ fn ui(f: &mut Frame, app: &App) {
494
494
// the rest will include the top
495
495
let output_size = Length ( SAVED_OUTPUT as u16 ) ;
496
496
497
- let vertical = Layout :: vertical ( [ Length ( 1 ) , top_size, output_size, Length ( 3 ) ] ) ;
497
+ let vertical = Layout :: vertical ( [ Length ( 2 ) , top_size, output_size, Length ( 3 ) ] ) ;
498
498
let [ title_area, top, output, input] = vertical. areas ( f. area ( ) ) ;
499
499
500
500
draw_title_area ( app, f, title_area) ;
@@ -659,6 +659,22 @@ fn draw_asm(app: &App, f: &mut Frame, asm: Rect) {
659
659
}
660
660
661
661
fn draw_title_area ( app : & App , f : & mut Frame , title_area : Rect ) {
662
+ let vertical_title = Layout :: vertical ( [ Length ( 1 ) , Length ( 1 ) ] ) ;
663
+ let [ first, second] = vertical_title. areas ( title_area) ;
664
+ f. render_widget (
665
+ Block :: new ( )
666
+ . borders ( Borders :: TOP )
667
+ . title ( vec ! [
668
+ "|" . fg( Color :: Rgb ( 100 , 100 , 100 ) ) ,
669
+ env!( "CARGO_PKG_NAME" ) . bold( ) ,
670
+ "-" . fg( Color :: Rgb ( 100 , 100 , 100 ) ) ,
671
+ "v" . into( ) ,
672
+ env!( "CARGO_PKG_VERSION" ) . into( ) ,
673
+ "|" . fg( Color :: Rgb ( 100 , 100 , 100 ) ) ,
674
+ ] )
675
+ . title_alignment ( Alignment :: Center ) ,
676
+ first,
677
+ ) ;
662
678
// Title Area
663
679
let ( msg, style) = match app. input_mode {
664
680
InputMode :: Normal => (
@@ -694,7 +710,7 @@ fn draw_title_area(app: &App, f: &mut Frame, title_area: Rect) {
694
710
} ;
695
711
let text = Text :: from ( Line :: from ( msg) ) . style ( style) ;
696
712
let help_message = Paragraph :: new ( text) ;
697
- f. render_widget ( help_message, title_area ) ;
713
+ f. render_widget ( help_message, second ) ;
698
714
}
699
715
700
716
fn draw_stack ( app : & App , f : & mut Frame , stack : Rect ) {
0 commit comments