I want a simple webview based on webkit, with a fixed size (e.g. 200x200) and without any scrollbars. I use X with no window manager.
I tried the following Python code:
import gtk
import webkit
view = webkit.WebView()
sw = gtk.ScrolledWindow()
sw.set_policy(gtk.POLICY_NEVER, gtk.POLICY_NEVER)
sw.add(view)
win = gtk.Window(gtk.WINDOW_TOPLEVEL)
win.add(sw)
win.set_default_size(200, 200)
win.show_all()
view.open("http://www.blackle.com")
gtk.main()
The scrollbars still show, although they should not.
I also tried to follow a different path and completely remove scrollbars on GTK by using ~/.gtkrc-2.0
:
style "custom-scrollbar-style"
{
GtkScrollbar::slider_width = 0
GtkScrollbar::min-slider-length = 0
GtkScrollbar::activate_slider = 0
GtkScrollbar::trough_border = 0
GtkScrollbar::has-forward-stepper = 0
GtkScrollbar::has-backward-stepper = 0
GtkScrollbar::stepper_size = 0
GtkScrollbar::stepper_spacing = 0
GtkScrollbar::trough-side-details = 0
GtkScrollbar::default_border = { 0, 0, 0, 0 }
GtkScrollbar::default_outside_border = { 0, 0, 0, 0 }
}
widget_class "*Scrollbar" style "custom-scrollbar-style"
Even with this, it still shows thin white lines on the two sides of the window where the scrollbars are.
Any ideas?