Skip to content

Commit a1788f5

Browse files
committed
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.
1 parent af1b9c8 commit a1788f5

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

data/meld.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
.meld-notebook-toolbar.toolbar {
2+
.meld-notebook-toolbar {
33
background-image: none;
4-
background-color: @theme_base_color;
4+
background-color: @theme_bg_color;
55
border-width: 0 0 1px 0;
66
border-style: solid;
77
border-color: @borders;
@@ -14,7 +14,7 @@ link-map {
1414
border-width: 0 0 1px 0;
1515
border-style: solid;
1616
border-color: @borders;
17-
background-color: mix(@theme_bg_color, @theme_base_color, 0.5);
17+
background-color: @theme_bg_color;
1818
}
1919

2020
.meld-vc-console-pane {

meld/gutterrendererchunk.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,23 @@ def on_setting_changed(self, meldsettings, key):
4444

4545
def draw_chunks(
4646
self, context, background_area, cell_area, start, end, state):
47+
48+
stylecontext = self.props.view.get_style_context()
49+
background_set, background_rgba = (
50+
stylecontext.lookup_color('theme_bg_color'))
51+
4752
line = start.get_line()
4853
chunk_index = self.linediffer.locate_chunk(self.from_pane, line)[0]
4954

5055
context.save()
5156
context.set_line_width(1.0)
5257

58+
context.rectangle(
59+
background_area.x, background_area.y,
60+
background_area.width, background_area.height)
61+
context.set_source_rgba(*background_rgba)
62+
context.fill()
63+
5364
if chunk_index is not None:
5465
chunk = self.linediffer.get_chunk(
5566
chunk_index, self.from_pane, self.to_pane)

0 commit comments

Comments
 (0)