[meld/meld-3-12] 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/meld-3-12] bin/meld: Add hacky CSS for GtkTextView drawing changes in 3.13+
- Date: Sat, 25 Oct 2014 20:00:14 +0000 (UTC)
commit 0974692593ae84ca95078abad5210648b5f33555
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 257e38c..f704b5c 100755
--- a/bin/meld
+++ b/bin/meld
@@ -187,6 +187,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]