[meld] data/meld.css, gutterrendererchunk: Try to adapt to new themeing colors



commit a1788f50511abb6bc81c56a3e99ce4f23c6917a5
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sat Feb 13 09:30:42 2016 +1000

    data/meld.css, gutterrendererchunk: Try to adapt to new themeing colors
    
    Behaviour of several widgets and the meaning of base colours appears to
    have changed in 3.20. This commit brings the LinkMap and gutter
    renderers in line to both use the theme base background, though this
    does look... fairly dated.

 data/meld.css               |    6 +++---
 meld/gutterrendererchunk.py |   11 +++++++++++
 2 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/data/meld.css b/data/meld.css
index d9f61c0..a9b518d 100644
--- a/data/meld.css
+++ b/data/meld.css
@@ -1,7 +1,7 @@
 
-.meld-notebook-toolbar.toolbar {
+.meld-notebook-toolbar {
        background-image: none;
-    background-color: @theme_base_color;
+    background-color: @theme_bg_color;
     border-width: 0 0 1px 0;
     border-style: solid;
     border-color: @borders;
@@ -14,7 +14,7 @@ link-map {
     border-width: 0 0 1px 0;
     border-style: solid;
     border-color: @borders;
-    background-color: mix(@theme_bg_color, @theme_base_color, 0.5);
+    background-color: @theme_bg_color;
 }
 
 .meld-vc-console-pane {
diff --git a/meld/gutterrendererchunk.py b/meld/gutterrendererchunk.py
index 07dfeed..a8b961f 100644
--- a/meld/gutterrendererchunk.py
+++ b/meld/gutterrendererchunk.py
@@ -44,12 +44,23 @@ class MeldGutterRenderer(object):
 
     def draw_chunks(
             self, context, background_area, cell_area, start, end, state):
+
+        stylecontext = self.props.view.get_style_context()
+        background_set, background_rgba = (
+            stylecontext.lookup_color('theme_bg_color'))
+
         line = start.get_line()
         chunk_index = self.linediffer.locate_chunk(self.from_pane, line)[0]
 
         context.save()
         context.set_line_width(1.0)
 
+        context.rectangle(
+            background_area.x, background_area.y,
+            background_area.width, background_area.height)
+        context.set_source_rgba(*background_rgba)
+        context.fill()
+
         if chunk_index is not None:
             chunk = self.linediffer.get_chunk(
                 chunk_index, self.from_pane, self.to_pane)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]