diff --git a/crates/pdfs-gui/src/app/pages/locations.rs b/crates/pdfs-gui/src/app/pages/locations.rs index a789c71..77524b0 100644 --- a/crates/pdfs-gui/src/app/pages/locations.rs +++ b/crates/pdfs-gui/src/app/pages/locations.rs @@ -262,20 +262,22 @@ pub(crate) fn build_locations_page(history: >k4::Widget) -> (gtk4::Widget, Loc (frame.upcast(), widgets) } -/// `child` in a clamp that scrolls vertically only, with page margins. +/// `child` across the page's full width, scrolling vertically only, with page +/// margins. fn scrolled_column(child: &impl IsA) -> gtk4::ScrolledWindow { - let clamp = adw::Clamp::builder().child(child).build(); - clamp.set_margin_top(18); - clamp.set_margin_bottom(18); - clamp.set_margin_start(18); - clamp.set_margin_end(18); + let column = gtk4::Box::new(gtk4::Orientation::Vertical, 0); + column.append(child); + column.set_margin_top(18); + column.set_margin_bottom(18); + column.set_margin_start(18); + column.set_margin_end(18); // Never scroll sideways: a location's subtitle holds a full path, and letting // the row grow to fit one pushes the controls at its end off screen. // Constrained, the path ellipsizes and the controls stay reachable. gtk4::ScrolledWindow::builder() .vexpand(true) .hscrollbar_policy(gtk4::PolicyType::Never) - .child(&clamp) + .child(&column) .build() } diff --git a/crates/pdfs-gui/src/app/pages/status.rs b/crates/pdfs-gui/src/app/pages/status.rs index b2c1245..34dbd47 100644 --- a/crates/pdfs-gui/src/app/pages/status.rs +++ b/crates/pdfs-gui/src/app/pages/status.rs @@ -1069,7 +1069,11 @@ pub(crate) fn repaint_transfers(ui: &Rc, items: &[TransferItem], jobs: &[Job let row_box = gtk4::Box::new(gtk4::Orientation::Vertical, 4); row_box.set_margin_top(8); row_box.set_margin_bottom(8); - let label = gtk4::Label::builder().halign(gtk4::Align::Start).build(); + // Ellipsized so a long file name cannot widen the page. + let label = gtk4::Label::builder() + .halign(gtk4::Align::Start) + .ellipsize(gtk4::pango::EllipsizeMode::Middle) + .build(); label.add_css_class("dim-label"); let bar = gtk4::ProgressBar::new(); row_box.append(&label);