forked from kemitix/git-next
feat(tui): remove some borders to clean up appearance
This commit is contained in:
parent
eae351d8a4
commit
f475095f4a
2 changed files with 5 additions and 9 deletions
|
@ -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)
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue