Skip to content
Commit fa6e4471 authored by Alexander Larsson's avatar Alexander Larsson
Browse files

Add size_request to IconContainer to work around unncecessary relayouting

The GtkScrolledWindow uses the widget prefered size as a guess as to
whether scrollbars are needed or not in the automatic scrollbars case.
If we don't report anything for them we typically get it wrong and cause
two size allocate calls on the child each time, with different sizes.
This (the two sizes speicifically) will cause unnecessary relayouts of
the window.

So, we just report the current size of the layed out icons as the prefered
size. This is somewhat wrong as its depending on previous size_allocation
calls rather than the "ideal" size of the widget, but since the ideal size
is ignored anyway and just used for this it works well.
parent 0cad9835
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment