GNOME Bugzilla – Bug 675517
Signal sidebar widgets about whether resize is on-going
Last modified: 2018-07-10 22:05:38 UTC
When the sidebar is resized, the widgets have their set_sidebar_width methods called with the new widths. This happens as often as possible, given the delays of those method calls. Some widgets, however, may take a while to resize. There should be a way for them to ignore resize events from an on-going resize and only resize when the user stops dragging the sidebar divider. This patch adds a in_resize argument (suggestions for a better name?) to the set_sidebar_width method, so the widget can decide whether it should adjust its size or not. The internal signaling is a bit hackish at the moment. At the very least it needs to be documented, but maybe there's a better way. The second patch changes replot to only resize at the end of drags. This is just for a demonstration; the current behavior hasn't bothered me at all.
Created attachment 213502 [details] [review] Change set_sidebar_width to say if in an on-going resize A binary flag is added to as an argument to set_sidebar_width. This check is started in ViewSidebarLayout.do_motion_notify, which checks whether it was called by a BUTTON_RELEASE event, which means that the resize is over, or not. This state is passed into sidebar_width via the sign of the value, which is a bit hackish.
Created attachment 213503 [details] [review] Only resize replot Axes at end of sidebar resize This is only for demonstration purposes; continuous resizing is probably okay for replot Axes.
Reinteract is not under active development anymore and had its last code changes in early 2012: http://git.fishsoup.net/cgit/reinteract/log/ Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is deprecated) if anyone takes the responsibility for active development again.