X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fview.cpp;h=f63401e61ed496f114ea0173cb985ea204c034f3;hp=269768669a5a44b8c94ac30c8ee7cbc9d2a2252f;hb=572c3bb71a824b15442ed63c600e77517c6ae411;hpb=00c518d66a61f28609b0eeddd0ce375d0002da94 diff --git a/pv/views/trace/view.cpp b/pv/views/trace/view.cpp index 26976866..f63401e6 100644 --- a/pv/views/trace/view.cpp +++ b/pv/views/trace/view.cpp @@ -899,6 +899,14 @@ bool View::header_was_shrunk() const void View::expand_header_to_fit() { + // Setting the maximum width of the header widget doesn't work as + // expected because the splitter would allow the user to make the + // pane wider than that, creating empty space as a result. + // To make this work, we stricly enforce the maximum width by + // expanding the header unless the user shrunk it on purpose. + // As we're then setting the width of the header pane, we set the + // splitter to the maximum allowed position. + int splitter_area_width = 0; for (int w : splitter_->sizes()) splitter_area_width += w; @@ -1101,13 +1109,6 @@ void View::on_signal_name_changed() void View::on_splitter_moved() { - // Setting the maximum width of the header widget doesn't work as - // expected because the splitter would allow the user to make the - // pane wider than that, creating empty space as a result. - // To make this work, we stricly enforce the maximum width by - // expanding the header unless the user shrunk it on purpose. - // As we're then setting the width of the header pane, we set the - // splitter to the maximum allowed position. if (!header_was_shrunk()) expand_header_to_fit(); }