Compare commits

..

No commits in common. "4517fe62e487d21dc53e265988ac90e0a62aca30" and "35e367693073151d65fef65ce570aa8833ab8439" have entirely different histories.

2 changed files with 10 additions and 2 deletions

View file

@ -4,6 +4,7 @@ use git_next_core::ForgeAlias;
use ratatui::{
buffer::Buffer,
layout::{Constraint, Direction, Layout, Rect},
text::Line,
widgets::Widget,
};
@ -19,6 +20,13 @@ impl<'a> Widget for ConfiguredAppWidget<'a> {
where
Self: Sized,
{
let layout_app = Layout::default()
.direction(Direction::Vertical)
.constraints(vec![Constraint::Length(1), Constraint::Fill(1)])
.split(area);
Line::from(format!("Forges: ({})", self.forges.keys().len())).render(layout_app[0], buf);
let layout_forge_list = Layout::default()
.direction(Direction::Vertical)
.constraints(
@ -29,7 +37,7 @@ impl<'a> Widget for ConfiguredAppWidget<'a> {
ViewState::Expanded => Constraint::Fill(1),
}),
)
.split(area);
.split(layout_app[1]);
self.forges
.iter()

View file

@ -20,7 +20,7 @@ impl<'a> Widget for ExpandedForgeWidget<'a> {
Self: Sized,
{
let block = Block::default()
.title(Title::from(format!(" forge: {} ", self.forge_alias)).alignment(Alignment::Left))
.title(Title::from(self.forge_alias.to_string()).alignment(Alignment::Center))
.borders(Borders::ALL);
let layout = Layout::default()
.direction(Direction::Vertical)