From 01ceb237f8446a31653bc294142a3a1397128373 Mon Sep 17 00:00:00 2001 From: Michael Mallan Date: Wed, 21 May 2025 09:33:22 +0100 Subject: [PATCH] fix: use scrollbar for node settings This fixes an issue when viewing a long node setting value, such as the cookie path, on a reduced window size. --- liana-gui/src/app/view/settings.rs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/liana-gui/src/app/view/settings.rs b/liana-gui/src/app/view/settings.rs index 911a3f78..932bd3e1 100644 --- a/liana-gui/src/app/view/settings.rs +++ b/liana-gui/src/app/view/settings.rs @@ -558,8 +558,24 @@ pub fn bitcoind<'a>( v.clone() }; Row::new() - .push(Container::new(text(k).bold().small()).width(Length::Fill)) - .push(text(t).small()) + .push(Container::new(text(k).bold().small()).width(Length::FillPortion(1))) + .push( + Container::new( + scrollable( + Column::new() + .push(Space::with_height(Length::Fixed(10.0))) + .push(text(t).small()) + // Space between the text and the scrollbar + .push(Space::with_height(Length::Fixed(10.0))), + ) + .direction(scrollable::Direction::Horizontal( + scrollable::Scrollbar::new().width(2).scroller_width(2), + )), + ) + .align_x(alignment::Horizontal::Right) + .padding(10) + .width(Length::FillPortion(3)), + ) .push(Space::with_width(10)) .push( Button::new(icon::clipboard_icon())