[meld] filediff: Use alpha value for chunk highlight from theme
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] filediff: Use alpha value for chunk highlight from theme
- Date: Thu, 2 Oct 2014 20:37:49 +0000 (UTC)
commit ffd1c447a4df01be8e51fc019b4fd48c549e0066
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Aug 10 08:57:42 2014 +1000
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.
data/meld.css | 2 +-
meld/filediff.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/data/meld.css b/data/meld.css
index 0fed210..9108c3d 100644
--- a/data/meld.css
+++ b/data/meld.css
@@ -18,7 +18,7 @@
@define-color unknown-text #888888;
@define-color current-line-highlight #ffff00;
@define-color syncpoint-outline #555555;
- define-color current-chunk-highlight #ffffff;
+ define-color current-chunk-highlight alpha(#ffffff, 0.5);
.meld-notebook-toolbar.toolbar {
background-image: none;
diff --git a/meld/filediff.py b/meld/filediff.py
index d552cfd..5ebe330 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1533,8 +1533,8 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
context.set_source_rgba(*self.fill_colors[change[0]])
context.fill_preserve()
if self.linediffer.locate_chunk(pane, change[1])[0] == self.cursor.chunk:
- h = self.fill_colors['current-chunk-highlight']
- context.set_source_rgba(h.red, h.green, h.blue, 0.5)
+ highlight = self.fill_colors['current-chunk-highlight']
+ context.set_source_rgba(*highlight)
context.fill_preserve()
context.set_source_rgba(*self.line_colors[change[0]])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]