diff --git a/src/uis/new_transaction.rs b/src/uis/new_transaction.rs index 3d84af4..7ac7697 100644 --- a/src/uis/new_transaction.rs +++ b/src/uis/new_transaction.rs @@ -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( 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,10 +217,12 @@ pub fn render_manual_row( }; f.render_widget( - Paragraph::new(Text::styled(right_text, Style::default().fg(Color::Black))).block( - Block::default() - .borders(Borders::NONE) - .style(Style::default().bg(right_bg_color)), + 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)), ), horizontal_pieces[1], );