From 4fd6ccc9b0eb8f862cc6bd9e686c0fb9bd94d348 Mon Sep 17 00:00:00 2001 From: Si Date: Wed, 23 Sep 2026 20:44:47 +0200 Subject: [PATCH] Keep the preview centred however long the status line gets The status line under the preview names every stage of the chain, and a label asks for its whole text as its minimum width. With a long chain that was wider than the pane, so the preview column was laid out wider than it is shown and the picture, centred in it, slid off to the right until a shorter status (such as "Saved ...") let it back. The line is now ellipsized and never asks for more room than it is given; the full text stays readable as its tooltip. Co-Authored-By: Claude Opus 5.5 --- src/gui/window.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gui/window.cpp b/src/gui/window.cpp index d674245..9de00d9 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -350,6 +350,12 @@ Gtk::Widget& EffectorWindow::buildPreview() { auto* box = Gtk::make_managed(Gtk::Orientation::VERTICAL); box->append(*overlay); + // A long chain makes a long status line; left to its natural width it + // would widen the preview column past the pane and push the picture off + // centre. Ellipsized, it never asks for more room than it is given. + status_.set_ellipsize(Pango::EllipsizeMode::END); + status_.set_margin_start(8); + status_.set_margin_end(8); status_.set_margin_top(6); status_.set_margin_bottom(8); status_.add_css_class("dim-label"); @@ -1400,6 +1406,7 @@ void EffectorWindow::showPlaceholder() { placeholder_.set_text(missingText()); previewStack_.set_visible_child("placeholder"); status_.set_text(""); + status_.set_tooltip_text(""); } void EffectorWindow::requestRender() { @@ -1505,6 +1512,7 @@ void EffectorWindow::onRenderFinished() { } status << "seed " << seed_ << " ยท " << millis << " ms"; status_.set_text(status.str()); + status_.set_tooltip_text(status.str()); } // -------------------------------------------------------------- project --- @@ -1679,6 +1687,7 @@ void EffectorWindow::writeProject(const std::string& path) { projectPath_ = path; updateTitle(); status_.set_text("Saved " + path); + status_.set_tooltip_text("Saved " + path); } void EffectorWindow::updateTitle() { @@ -1722,6 +1731,7 @@ void EffectorWindow::onSaveChosen(const Glib::RefPtr& result, } clearError(); status_.set_text("Saved " + path.string()); + status_.set_tooltip_text("Saved " + path.string()); } // --------------------------------------------------------------- errors ---