Commit a1788f50 authored by Kai Willadsen's avatar Kai Willadsen

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.
parent af1b9c8c
.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 {
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment