A sidebar resize end notification for widgets?

14 views
Skip to first unread message

Robert Schroll

unread,
Mar 27, 2012, 8:21:55 PM3/27/12
to reint...@googlegroups.com
A while back, I made refigure2 (https://github.com/rschroll/refigure2)
aware of sidebar resizing. I chose to adjust the whole size of the
widget to keep the aspect ratio fixed. I hadn't played much with it
until today. Unfortunately, the layout takes an appreciable fraction of
a second. If several figures are in the sidebar, resizing it becomes
very sluggish.

With this code (https://gist.github.com/2221668), I can make the figures
wait until a pause in the resizing before redrawing themselves. In a
little bit of testing, this feels much better. Unfortunately, the code
to adjust the vertical layout is not called after the widget is actually
resized. Now I could probably sneak around and fix this. But....

I started wondering if there should be a way for sidebar widgets to wait
until the resizing is over before adjusting themselves. Perhaps another
special method for them, an additional argument to set_sidebar_width, or
some signal for them to listen to? I'm not suggesting replacing the
current system, just augmenting it.

Thoughts? Or have I missed a better way to handle this?

Robert

Robert Schroll

unread,
May 5, 2012, 1:44:21 PM5/5/12
to reint...@googlegroups.com
I've just submitted a bug
(https://bugzilla.gnome.org/show_bug.cgi?id=675517) with one way of
doing this. I like this behavior, but I'm interested to hear what
others think.

Robert
Reply all
Reply to author
Forward
0 new messages