Skip to content

Instantly share code, notes, and snippets.

@stognola
stognola / transparent-window.py
Created May 16, 2017 09:15 — forked from tassoevan/transparent-window.py
Transparent window for WebView (WebKit) in Python (in progress)
import sys
from gi.repository import Gtk, Gdk, WebKit
class WebKitWindow(Gtk.Window):
scrolls = None
webView = None
def __init__(self, url, transparent=False):
Gtk.Window.__init__(self, Gtk.WindowType.TOPLEVEL, title='')
self.scrolls = Gtk.ScrolledWindow()
@stognola
stognola / webkit_gtk_transparency.py
Created May 16, 2017 09:15 — forked from pmellati/webkit_gtk_transparency.py
Shows how to configure a transparency-enabled Webkit WebView in Gtk 3. 2013.
# Transparency in Webkit and Gtk.
from gi.repository import Gtk, Gdk, GLib, WebKit
transparent_window_style_provider = Gtk.CssProvider()
transparent_window_style_provider.load_from_data("""
GtkWindow {
background-color: rgba(100,100,0,0);
background-image: none;