Compare commits
2 commits
35e3676930
...
4517fe62e4
Author | SHA1 | Date | |
---|---|---|---|
4517fe62e4 | |||
c6bf287ed1 |
2 changed files with 2 additions and 10 deletions
|
@ -4,7 +4,6 @@ use git_next_core::ForgeAlias;
|
||||||
use ratatui::{
|
use ratatui::{
|
||||||
buffer::Buffer,
|
buffer::Buffer,
|
||||||
layout::{Constraint, Direction, Layout, Rect},
|
layout::{Constraint, Direction, Layout, Rect},
|
||||||
text::Line,
|
|
||||||
widgets::Widget,
|
widgets::Widget,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,13 +19,6 @@ impl<'a> Widget for ConfiguredAppWidget<'a> {
|
||||||
where
|
where
|
||||||
Self: Sized,
|
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()
|
let layout_forge_list = Layout::default()
|
||||||
.direction(Direction::Vertical)
|
.direction(Direction::Vertical)
|
||||||
.constraints(
|
.constraints(
|
||||||
|
@ -37,7 +29,7 @@ impl<'a> Widget for ConfiguredAppWidget<'a> {
|
||||||
ViewState::Expanded => Constraint::Fill(1),
|
ViewState::Expanded => Constraint::Fill(1),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.split(layout_app[1]);
|
.split(area);
|
||||||
|
|
||||||
self.forges
|
self.forges
|
||||||
.iter()
|
.iter()
|
||||||
|
|
|
@ -20,7 +20,7 @@ impl<'a> Widget for ExpandedForgeWidget<'a> {
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
{
|
{
|
||||||
let block = Block::default()
|
let block = Block::default()
|
||||||
.title(Title::from(self.forge_alias.to_string()).alignment(Alignment::Center))
|
.title(Title::from(format!(" forge: {} ", self.forge_alias)).alignment(Alignment::Left))
|
||||||
.borders(Borders::ALL);
|
.borders(Borders::ALL);
|
||||||
let layout = Layout::default()
|
let layout = Layout::default()
|
||||||
.direction(Direction::Vertical)
|
.direction(Direction::Vertical)
|
||||||
|
|
Loading…
Reference in a new issue