From ad69711c4a3e76b4f4c11a3ab66b254c738b98ed Mon Sep 17 00:00:00 2001 From: edouardparis Date: Mon, 8 Apr 2024 11:13:35 +0200 Subject: [PATCH] Change descriptor view in installer behind scrollable View is broken because of the long line of text of the descriptor, current fix is to put it behind a scrollable until we find a better way to display it to the user. --- gui/src/installer/view.rs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/gui/src/installer/view.rs b/gui/src/installer/view.rs index aa71e077f..34070f2e3 100644 --- a/gui/src/installer/view.rs +++ b/gui/src/installer/view.rs @@ -758,7 +758,16 @@ pub fn register_descriptor<'a>( .push(card::simple( Column::new() .push(text("The descriptor:").small().bold()) - .push(text(descriptor.clone()).small()) + .push( + scrollable( + Column::new() + .push(text(descriptor.to_owned()).small()) + .push(Space::with_height(Length::Fixed(5.0))), + ) + .direction(scrollable::Direction::Horizontal( + scrollable::Properties::new().width(5).scroller_width(5), + )), + ) .push( Row::new().push(Column::new().width(Length::Fill)).push( button::secondary(Some(icon::clipboard_icon()), "Copy") @@ -859,7 +868,16 @@ pub fn backup_descriptor<'a>( .push(card::simple( Column::new() .push(text("The descriptor:").small().bold()) - .push(text(descriptor.clone()).small()) + .push( + scrollable( + Column::new() + .push(text(descriptor.to_owned()).small()) + .push(Space::with_height(Length::Fixed(5.0))), + ) + .direction(scrollable::Direction::Horizontal( + scrollable::Properties::new().width(5).scroller_width(5), + )), + ) .push( Row::new().push(Column::new().width(Length::Fill)).push( button::secondary(Some(icon::clipboard_icon()), "Copy")