From 85e44f0bb82be1a3eed8552caf7a5bef0d7bae4e Mon Sep 17 00:00:00 2001 From: Uncle Stretch Date: Wed, 25 Dec 2024 14:25:09 +0300 Subject: [PATCH] additional spaces needed, because borders are symbols too Signed-off-by: Uncle Stretch --- src/components/wallet/add_address_book_record.rs | 8 ++++---- src/components/wallet/transfer.rs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/wallet/add_address_book_record.rs b/src/components/wallet/add_address_book_record.rs index 25e6285..16a1981 100644 --- a/src/components/wallet/add_address_book_record.rs +++ b/src/components/wallet/add_address_book_record.rs @@ -160,8 +160,8 @@ impl Component for AddAddressBookRecord { fn draw(&mut self, frame: &mut Frame, area: Rect) -> Result<()> { if self.is_active { let size = area.as_size(); - let name_area = Rect::new(size.width / 2, size.height / 2, 50, 3); - let address_area = Rect::new(size.width / 2, size.height / 2 + 3, 50, 3); + let name_area = Rect::new(size.width / 2, size.height / 2, 51, 3); + let address_area = Rect::new(size.width / 2, size.height / 2 + 3, 51, 3); let (border_style, border_type) = self.palette.create_popup_style(); let input_name = Paragraph::new(self.name.value()) @@ -180,8 +180,8 @@ impl Component for AddAddressBookRecord { .title_alignment(Alignment::Right) .title("Address for new name")); - let v = Layout::vertical([Constraint::Max(3)]).flex(Flex::Center); - let h = Layout::horizontal([Constraint::Max(50)]).flex(Flex::Center); + let v = Layout::vertical([Constraint::Length(3)]).flex(Flex::Center); + let h = Layout::horizontal([Constraint::Length(51)]).flex(Flex::Center); let [name_area] = v.areas(name_area); let [name_area] = h.areas(name_area); diff --git a/src/components/wallet/transfer.rs b/src/components/wallet/transfer.rs index 260adb6..5e4d5ed 100644 --- a/src/components/wallet/transfer.rs +++ b/src/components/wallet/transfer.rs @@ -221,8 +221,8 @@ impl Component for Transfer { fn draw(&mut self, frame: &mut Frame, area: Rect) -> Result<()> { if self.is_active { let size = area.as_size(); - let receiver_area = Rect::new(size.width / 2, size.height / 2, 50, 3); - let amount_area = Rect::new(size.width / 2, size.height / 2 + 3, 50, 3); + let receiver_area = Rect::new(size.width / 2, size.height / 2, 51, 3); + let amount_area = Rect::new(size.width / 2, size.height / 2 + 3, 51, 3); let (border_style, border_type) = self.palette.create_popup_style(); let input_receiver = Paragraph::new(self.receiver.value()) @@ -241,8 +241,8 @@ impl Component for Transfer { .title_alignment(Alignment::Right) .title("Amount to send")); - let v = Layout::vertical([Constraint::Max(3)]).flex(Flex::Center); - let h = Layout::horizontal([Constraint::Max(50)]).flex(Flex::Center); + let v = Layout::vertical([Constraint::Length(3)]).flex(Flex::Center); + let h = Layout::horizontal([Constraint::Length(51)]).flex(Flex::Center); let [receiver_area] = v.areas(receiver_area); let [receiver_area] = h.areas(receiver_area);