[meld: 147/180] sourceview: Support draw_layer
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld: 147/180] sourceview: Support draw_layer
- Date: Thu, 23 Jul 2015 21:43:44 +0000 (UTC)
commit f66586343dc22630d3b959bc08de51c91e115085
Author: Kai Willadsen <kai willadsen gmail com>
Date: Fri Oct 10 07:31:04 2014 +1000
sourceview: Support draw_layer
meld/sourceview.py | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/meld/sourceview.py b/meld/sourceview.py
index 329cef6..cb3f83b 100644
--- a/meld/sourceview.py
+++ b/meld/sourceview.py
@@ -157,17 +157,9 @@ class MeldSourceView(GtkSource.View):
tag.props.background_rgba = colour_lookup_with_fallback(
style, "inline-bg", "LightSteelBlue2")
- def do_draw(self, context):
-
- windows = [
- self.get_window(window_type) for window_type in
- (Gtk.TextWindowType.TEXT, Gtk.TextWindowType.WIDGET)
- if self.get_window(window_type)]
-
- should_draw = [Gtk.cairo_should_draw_window(context, w) for w in windows]
-
- if not any(should_draw):
- return GtkSource.View.do_draw(self, context)
+ def do_draw_layer(self, layer, context):
+ if layer != Gtk.TextViewLayer.BELOW:
+ return GtkSource.View.do_draw_layer(self, layer, context)
context.save()
@@ -260,7 +252,7 @@ class MeldSourceView(GtkSource.View):
context.restore()
- return GtkSource.View.do_draw(self, context)
+ return GtkSource.View.do_draw_layer(self, layer, context)
class CommitMessageSourceView(GtkSource.View):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]