[gedit] Don't use new [color]_float fields of gdk.Color
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gedit] Don't use new [color]_float fields of gdk.Color
- Date: Mon, 9 Nov 2009 15:13:14 +0000 (UTC)
commit 0701efd980edb0faef212ae17b10cbf61ce72d72
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date: Mon Nov 9 16:13:00 2009 +0100
Don't use new [color]_float fields of gdk.Color
plugins/snippets/snippets/Document.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/plugins/snippets/snippets/Document.py b/plugins/snippets/snippets/Document.py
index aa508f8..424367f 100644
--- a/plugins/snippets/snippets/Document.py
+++ b/plugins/snippets/snippets/Document.py
@@ -1018,14 +1018,17 @@ class Document:
ctx.rel_line_to(extend_width * 2, 0)
ctx.stroke()
+ def from_color(self, col):
+ return [col.red / 0x10000, col.green / 0x10000, col.blue / 0x10000]
+
def draw_placeholder(self, ctx, placeholder):
if isinstance(placeholder, PlaceholderEnd):
return
buf = self.view.get_buffer()
- col = self.view.get_style().text[gtk.STATE_INSENSITIVE]
- ctx.set_source_rgba(col.red_float, col.green_float, col.blue_float, 0.5)
+ col = self.from_color(self.view.get_style().text[gtk.STATE_INSENSITIVE])
+ ctx.set_source_rgba(col[0], col[1], col[2], 0.5)
if placeholder.tabstop > 0:
ctx.set_dash([], 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]