[meld] bin/meld: Add hacky CSS for GtkTextView drawing changes in 3.13+
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] bin/meld: Add hacky CSS for GtkTextView drawing changes in 3.13+
- Date: Thu, 9 Oct 2014 20:03:15 +0000 (UTC)
commit 61f53b0cd65229f799505564e871bc8c7b2e5c04
Author: Kai Willadsen <kai willadsen gmail com>
Date: Fri Oct 10 05:59:12 2014 +1000
bin/meld: Add hacky CSS for GtkTextView drawing changes in 3.13+
As on GTK+ 3.13.something, GtkTextView now provides us with a
draw_layer vfunc that we can use instead of just drawing on our
SourceView in the callback and assuming that it will work. However, as
part of this change, the background is now also reset when drawing,
which has broken our existing drawing mechanism (see bgo#737957).
Until we can adapt to the new drawing model (and require GTK+ 3.14 for
it) this hack just makes the background of our SourceView transparent,
so that our painting on the lower layer is still shown.
bin/meld | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/bin/meld b/bin/meld
index 4fe5c56..15b6896 100755
--- a/bin/meld
+++ b/bin/meld
@@ -195,6 +195,14 @@ def setup_resources():
Gdk.Screen.get_default(), provider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
+ if Gtk.get_minor_version() >= 13:
+ fixes_provider = Gtk.CssProvider()
+ fixes_provider.load_from_data(
+ "MeldSourceView { background-color: rgba(0.0, 0.0, 0.0, 0.0); }")
+ Gtk.StyleContext.add_provider_for_screen(
+ Gdk.Screen.get_default(), fixes_provider,
+ Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
+
def setup_settings():
import meld.conf
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]