Merge branch 'centered-preview'

This commit is contained in:
Si
2026-09-23 20:44:55 +02:00
+10
View File
@@ -350,6 +350,12 @@ Gtk::Widget& EffectorWindow::buildPreview() {
auto* box = Gtk::make_managed<Gtk::Box>(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<Gio::AsyncResult>& result,
}
clearError();
status_.set_text("Saved " + path.string());
status_.set_tooltip_text("Saved " + path.string());
}
// --------------------------------------------------------------- errors ---