basic manual entry format finished
This commit is contained in:
parent
871d6317ff
commit
3e247b98c4
1 changed files with 10 additions and 7 deletions
|
@ -5,7 +5,7 @@ use crate::{
|
|||
use crossterm::event::{KeyCode, KeyEvent, KeyEventKind};
|
||||
use ratatui::{
|
||||
backend::Backend,
|
||||
layout::{Constraint, Direction, Layout, Rect},
|
||||
layout::{Constraint, Direction, Layout, Rect, Alignment},
|
||||
style::{Color, Style},
|
||||
text::Text,
|
||||
widgets::{Block, Borders, Paragraph},
|
||||
|
@ -201,11 +201,12 @@ pub fn render_manual_row<B: Backend>(
|
|||
|
||||
let horizontal_pieces = Layout::default()
|
||||
.direction(Direction::Horizontal)
|
||||
.constraints([Constraint::Percentage(50), Constraint::Percentage(50)])
|
||||
.constraints([Constraint::Percentage(35), Constraint::Percentage(45), Constraint::Percentage(20)])
|
||||
.split(row_area);
|
||||
|
||||
f.render_widget(
|
||||
Paragraph::new(Text::styled(left_text, Style::default().fg(Color::Yellow))),
|
||||
Paragraph::new(Text::styled(left_text, Style::default().fg(Color::Yellow)))
|
||||
.alignment(Alignment::Right),
|
||||
horizontal_pieces[0],
|
||||
);
|
||||
|
||||
|
@ -216,7 +217,9 @@ pub fn render_manual_row<B: Backend>(
|
|||
};
|
||||
|
||||
f.render_widget(
|
||||
Paragraph::new(Text::styled(right_text, Style::default().fg(Color::Black))).block(
|
||||
Paragraph::new(Text::styled(right_text, Style::default().fg(Color::Black)))
|
||||
.alignment(Alignment::Center)
|
||||
.block(
|
||||
Block::default()
|
||||
.borders(Borders::NONE)
|
||||
.style(Style::default().bg(right_bg_color)),
|
||||
|
|
Loading…
Reference in a new issue