[webkit-gtk] GtkLauncher scrolling problem

Gustavo Noronha Silva gns at gnome.org
Thu May 26 05:55:43 PDT 2011


On Thu, 2011-05-26 at 02:38 +0000, Brendan Taylor wrote:
> This has been quite helpful in clearing up why I'm getting the results I 
> am, but I don't know if I'm any closer to a solution.
> 
> I tried hooking this up to the ScrolledWindow's size-request signal:

That was to the allocate signal it seems? You should override the
request, or enforce a different allocation. What you did bellow was just
manually do what GTK+ would do anyway =).

> 
>     void scrolled_win_size_allocate(GtkWidget *scrolled_win, GtkAllocation *allocation) {
>       gtk_widget_size_allocate(GTK_WIDGET(uzbl.gui.web_view), allocation);
>     }
> 
> But this seems to have the same result as gtk_scrolled_window_set_policy(sw, AUTO, AUTO),
> i.e. scrollbars appear when the page content is bigger than the size 
> that has been allocated to the WebView.

If you keep the policy as AUTO, or let the webview set it to auto by not
handling that signal, then you will get scrollbars.

> > This is not specific to WebKitGTK+, it's also how GtkTextView works. 
> 
> This is why I'm confused; there's some difference between the two, 
> because I can easily make a TextView in a ScrolledWindow that is 
> scrollable, limited to the size of its parent container, and does not 
> display scrollbars.[1]

In my tests with the code you provided if I add more lines of text to
the textbuffer the window grows to fit it, as expected, doesn't it for
you? What am I missing?

Cheers,

-- 
Gustavo Noronha Silva <gns at gnome.org>
GNOME Project



More information about the webkit-gtk mailing list