This commit is contained in:
ChristianVisintin
2020-11-29 15:48:57 +01:00
parent a2492d1442
commit badbddb240

View File

@@ -1493,8 +1493,16 @@ impl FileTransferActivity {
let mut remote_state: ListState = ListState::default();
remote_state.select(Some(self.remote.index));
// Draw tabs
f.render_stateful_widget(self.draw_local_explorer(), tabs_chunks[0], &mut localhost_state);
f.render_stateful_widget(self.draw_remote_explorer(), tabs_chunks[1], &mut remote_state);
f.render_stateful_widget(
self.draw_local_explorer(),
tabs_chunks[0],
&mut localhost_state,
);
f.render_stateful_widget(
self.draw_remote_explorer(),
tabs_chunks[1],
&mut remote_state,
);
// Set log state
let mut log_state: ListState = ListState::default();
log_state.select(Some(self.log_index));
@@ -1507,8 +1515,13 @@ impl FileTransferActivity {
let popup_area: Rect = self.draw_popup_area(f.size());
f.render_widget(Clear, popup_area); //this clears out the background
match popup {
PopupType::Alert(color, txt) => f.render_widget(self.draw_popup_alert(color.clone(), txt.clone()), popup_area),
PopupType::Fatal(txt) => f.render_widget(self.draw_popup_fatal(txt.clone()), popup_area),
PopupType::Alert(color, txt) => f.render_widget(
self.draw_popup_alert(color.clone(), txt.clone()),
popup_area,
),
PopupType::Fatal(txt) => {
f.render_widget(self.draw_popup_fatal(txt.clone()), popup_area)
}
PopupType::Input(txt, _) => {
f.render_widget(self.draw_popup_input(txt.clone()), popup_area);
// Set cursor
@@ -1516,10 +1529,16 @@ impl FileTransferActivity {
popup_area.x + self.input_txt.width() as u16 + 1,
popup_area.y + 1,
)
},
PopupType::Progress(txt) => f.render_widget(self.draw_popup_progress(txt.clone()), popup_area),
PopupType::Wait(txt) => f.render_widget(self.draw_popup_wait(txt.clone()), popup_area),
PopupType::YesNo(txt, _, _) => f.render_widget(self.draw_popup_yesno(txt.clone()), popup_area),
}
PopupType::Progress(txt) => {
f.render_widget(self.draw_popup_progress(txt.clone()), popup_area)
}
PopupType::Wait(txt) => {
f.render_widget(self.draw_popup_wait(txt.clone()), popup_area)
}
PopupType::YesNo(txt, _, _) => {
f.render_widget(self.draw_popup_yesno(txt.clone()), popup_area)
}
}
}
});