Skip to content

Commit ffd1c44

Browse files
committed
filediff: Use alpha value for chunk highlight from theme
This lets us customise the highlight for dark themes easily, as they need significantly less highlighting for the chunk to stand out properly.
1 parent 6110d16 commit ffd1c44

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

data/meld.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@define-color unknown-text #888888;
1919
@define-color current-line-highlight #ffff00;
2020
@define-color syncpoint-outline #555555;
21-
@define-color current-chunk-highlight #ffffff;
21+
@define-color current-chunk-highlight alpha(#ffffff, 0.5);
2222

2323
.meld-notebook-toolbar.toolbar {
2424
background-image: none;

meld/filediff.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,8 +1533,8 @@ def on_textview_draw(self, textview, context):
15331533
context.set_source_rgba(*self.fill_colors[change[0]])
15341534
context.fill_preserve()
15351535
if self.linediffer.locate_chunk(pane, change[1])[0] == self.cursor.chunk:
1536-
h = self.fill_colors['current-chunk-highlight']
1537-
context.set_source_rgba(h.red, h.green, h.blue, 0.5)
1536+
highlight = self.fill_colors['current-chunk-highlight']
1537+
context.set_source_rgba(*highlight)
15381538
context.fill_preserve()
15391539

15401540
context.set_source_rgba(*self.line_colors[change[0]])

0 commit comments

Comments
 (0)