[webkit-gtk] Resizing issue
mrobinson at webkit.org
Fri Dec 23 07:49:29 PST 2011
On Tue, Dec 20, 2011 at 3:17 PM, Eric Gregory <eric at yorba.org> wrote:
> Problem is, when I stretch out the window, the WebViews expand their height,
> but don't shrink when the content no longer needs the height. In other
> words, if you make the window really narrow horizontally and then make it
> wide, the WebViews have a lot of unnecessary whitespace at the bottom.
The issue here is that the WebKitWebView always asks for enough size
to display its contents. When you expand the widget the content size
gets bigger so it asks for more space. You have a couple options here.
You can either pack the WebView into a GtkScrolledWindow or subclass
it and override the get_preferred_height and get_preferred_width
methods (or size-request if you are using GTK+ 2.x).
More information about the webkit-gtk