Hide Region frame outline when region width is < 2 pixels, fixes #6615
authorTim Mayberry <mojofunk@gmail.com>
Wed, 30 Sep 2015 09:21:11 +0000 (19:21 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Tue, 1 Dec 2015 11:12:12 +0000 (21:12 +1000)
gtk2_ardour/time_axis_view_item.cc

index 5a85005e3a1dcab8d0d28f2f759f734b7a2fa160..dbc558600a340178f51392ee063da609afaac075 100644 (file)
@@ -171,7 +171,7 @@ TimeAxisViewItem::init (ArdourCanvas::Item* parent, double fpp, uint32_t base_co
        position_locked = false;
        max_item_duration = ARDOUR::max_framepos;
        min_item_duration = 0;
-       show_vestigial = true;
+       show_vestigial = false;
        visibility = vis;
        _sensitive = true;
        name_text_width = 0;
@@ -191,6 +191,7 @@ TimeAxisViewItem::init (ArdourCanvas::Item* parent, double fpp, uint32_t base_co
                                                                         trackview.current_height()));
 
                frame->set_outline_what (ArdourCanvas::Rectangle::What (ArdourCanvas::Rectangle::LEFT|ArdourCanvas::Rectangle::RIGHT));
+               frame->show ();
 
                CANVAS_DEBUG_NAME (frame, string_compose ("frame for %1", get_item_name()));
 
@@ -837,7 +838,8 @@ TimeAxisViewItem::reset_width_dependent_items (double pixel_width)
                }
 
                if (frame) {
-                       frame->hide();
+                       frame->set_outline (false);
+                       frame->set_x1 (std::max(1.0, pixel_width));
                }
 
                if (frame_handle_start) {
@@ -851,7 +853,7 @@ TimeAxisViewItem::reset_width_dependent_items (double pixel_width)
                }
 
                if (frame) {
-                       frame->show();
+                       frame->set_outline (true);
                        /* Note: x0 is always zero - the position is defined by
                         * the position of the group, not the frame.
                         */