diff --git a/src/gui/widgets/timeline-widget.hpp b/src/gui/widgets/timeline-widget.hpp index cbd21925e..f362faaff 100644 --- a/src/gui/widgets/timeline-widget.hpp +++ b/src/gui/widgets/timeline-widget.hpp @@ -308,6 +308,7 @@ public: protected: static const int TrackPadding; static const int HeaderWidth; + static const int HeaderIndentWidth; static const double ZoomIncrement; friend class timeline::TimelineViewWindow; diff --git a/src/gui/widgets/timeline/timeline-layout-helper.cpp b/src/gui/widgets/timeline/timeline-layout-helper.cpp index 4feedd5cc..85864b4ea 100644 --- a/src/gui/widgets/timeline/timeline-layout-helper.cpp +++ b/src/gui/widgets/timeline/timeline-layout-helper.cpp @@ -133,24 +133,20 @@ TimelineLayoutHelper::get_total_height() const void TimelineLayoutHelper::update_layout() { - // Make sure the style are loaded - //read_styles(); + int offset = 0; // Clear previously cached layout headerBoxes.clear(); - - // Start at minus-the-scroll offset - int offset = 0;//-timelineWidget->get_y_scroll_offset(); - - //const Allocation container_allocation = get_allocation(); - const int header_width = 150;//container_allocation.get_width(); - const int indent_width = 10; + // Do the layout + const int header_width = TimelineWidget::HeaderWidth; + const int indent_width = TimelineWidget::HeaderIndentWidth; layout_headers_recursive(layoutTree.begin(), offset, header_width, indent_width, 0, true); totalHeight = offset; + // Signal that the layout has changed timelineWidget.on_layout_changed(); } diff --git a/src/gui/widgets/timeline/timeline-layout-helper.hpp b/src/gui/widgets/timeline/timeline-layout-helper.hpp index 6ca659365..39c01ea4b 100644 --- a/src/gui/widgets/timeline/timeline-layout-helper.hpp +++ b/src/gui/widgets/timeline/timeline-layout-helper.hpp @@ -86,7 +86,7 @@ protected: /** * Recursively lays out all the controls in the header widget. - * /!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + * /!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [in,out] * * * * @param track The parent track object which will be recursed into.