feat(tui): remove some borders to clean up appearance
All checks were successful
Rust / build (push) Successful in 10m3s
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Release Please / Release-plz (push) Successful in 53s

This commit is contained in:
Paul Campbell 2024-09-01 06:57:16 +01:00
parent eae351d8a4
commit f475095f4a
2 changed files with 5 additions and 9 deletions

View file

@ -23,7 +23,7 @@ impl<'a> HeightContraintLength for ExpandedForgeWidget<'a> {
.iter() .iter()
.map(HeightContraintLength::height_constraint_length) .map(HeightContraintLength::height_constraint_length)
.sum::<u16>() .sum::<u16>()
+ 2 // top + bottom borders + 2 // top title + bottom padding
} }
} }
impl<'a> Widget for ExpandedForgeWidget<'a> { impl<'a> Widget for ExpandedForgeWidget<'a> {
@ -31,9 +31,9 @@ impl<'a> Widget for ExpandedForgeWidget<'a> {
where where
Self: Sized, Self: Sized,
{ {
let block = Block::default() let block = Block::default().title(
.title(Title::from(format!(" forge: {} ", self.forge_alias)).alignment(Alignment::Left)) Title::from(format!(" forge: {} ", self.forge_alias)).alignment(Alignment::Left),
.borders(Borders::ALL); );
let children = self.children(); let children = self.children();
let layout = Layout::default() let layout = Layout::default()
.direction(Direction::Vertical) .direction(Direction::Vertical)

View file

@ -85,10 +85,6 @@ struct InnerRepoWidget<'a> {
pub alert: Option<&'a str>, pub alert: Option<&'a str>,
pub branches: Option<&'a RepoBranches>, pub branches: Option<&'a RepoBranches>,
pub log: Option<&'a git::graph::Log>, pub log: Option<&'a git::graph::Log>,
// pub view_state: &'a actor::ViewState,
// pub main: &'a Commit,
// pub next: &'a Commit,
// pub dev: &'a Commit,
} }
impl<'a> HeightContraintLength for InnerRepoWidget<'a> { impl<'a> HeightContraintLength for InnerRepoWidget<'a> {
fn height_constraint_length(&self) -> u16 { fn height_constraint_length(&self) -> u16 {
@ -109,7 +105,7 @@ impl<'a> Widget for InnerRepoWidget<'a> {
self.message, self.message,
self.branches, self.branches,
)) ))
.borders(Borders::ALL); .borders(Borders::TOP);
if let Some(log) = self.log { if let Some(log) = self.log {
CommitLog { log }.render(block.inner(area), buf); CommitLog { log }.render(block.inner(area), buf);
} }