From feed0008bcf86c888efc3870119c51fe6ea7de51 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 13 Dec 2023 17:57:04 +0100 Subject: [PATCH] ui: editor: fix track/canvas separator alignement with 0 or more rulers visible --- gtk2_ardour/editor_rulers.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc index 502942b246..9893373d00 100644 --- a/gtk2_ardour/editor_rulers.cc +++ b/gtk2_ardour/editor_rulers.cc @@ -716,13 +716,13 @@ Editor::update_ruler_visibility () _selection_marker_group->hide (); } - ruler_separator->set_y_position ((int)(timebar_height * visible_timebars)); - - time_bars_vbox.set_size_request (-1, (int)(timebar_height * visible_timebars) + 1); + int ruler_separator_y = std::max(1, (int)(timebar_height * visible_timebars)); + ruler_separator->set_y_position (ruler_separator_y); + time_bars_vbox.set_size_request (-1, ruler_separator_y); /* move hv_scroll_group (trackviews) to the end of the timebars */ - hv_scroll_group->set_y_position ((int)(timebar_height * visible_timebars)); + hv_scroll_group->set_y_position (ruler_separator_y); compute_fixed_ruler_scale (); update_fixed_rulers();