@@ -13,17 +13,9 @@ use anyhow::Result;
1313use asyncgit:: { sync:: CommitId , AsyncNotification } ;
1414use crossbeam_channel:: Sender ;
1515use crossterm:: event:: Event ;
16- use tui:: {
17- backend:: Backend ,
18- layout:: Rect ,
19- text:: Span ,
20- widgets:: { Block , Borders , Clear } ,
21- Frame ,
22- } ;
16+ use tui:: { backend:: Backend , layout:: Rect , widgets:: Clear , Frame } ;
2317
2418pub struct RevisionFilesPopup {
25- title : String ,
26- theme : SharedTheme ,
2719 visible : bool ,
2820 key_config : SharedKeyConfig ,
2921 files : RevisionFilesComponent ,
@@ -38,14 +30,12 @@ impl RevisionFilesPopup {
3830 key_config : SharedKeyConfig ,
3931 ) -> Self {
4032 Self {
41- title : String :: new ( ) ,
4233 files : RevisionFilesComponent :: new (
4334 queue,
4435 sender,
45- theme. clone ( ) ,
36+ theme,
4637 key_config. clone ( ) ,
4738 ) ,
48- theme,
4939 visible : false ,
5040 key_config,
5141 }
@@ -54,8 +44,6 @@ impl RevisionFilesPopup {
5444 ///
5545 pub fn open ( & mut self , commit : CommitId ) -> Result < ( ) > {
5646 self . files . set_commit ( commit) ?;
57- self . title =
58- format ! ( "Files at [{}]" , commit. get_short_string( ) ) ;
5947 self . show ( ) ?;
6048
6149 Ok ( ( ) )
@@ -80,16 +68,16 @@ impl DrawableComponent for RevisionFilesPopup {
8068 ) -> Result < ( ) > {
8169 if self . is_visible ( ) {
8270 f. render_widget ( Clear , area) ;
83- f. render_widget (
84- Block :: default ( )
85- . borders ( Borders :: TOP )
86- . title ( Span :: styled (
87- format ! ( " {}" , self . title) ,
88- self . theme . title ( true ) ,
89- ) )
90- . border_style ( self . theme . block ( true ) ) ,
91- area,
92- ) ;
71+ // f.render_widget(
72+ // Block::default()
73+ // .borders(Borders::TOP)
74+ // .title(Span::styled(
75+ // format!(" {}", self.title),
76+ // self.theme.title(true),
77+ // ))
78+ // .border_style(self.theme.block(true)),
79+ // area,
80+ // );
9381
9482 self . files . draw ( f, area) ?;
9583 }
0 commit comments