From 7d05ba72c801ba0ceaa744c2d87aceaccaccdbc4 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Thu, 22 Jan 2009 07:27:36 +0100 Subject: [PATCH] Clock: Independent face for clock overlay display. William Henney writes: If a heading has tags, then that heading's time summary overlay (shown by C-c C-x C-d) is displayed using the org-tag face. This looks a bit strange. Is it intended? It is especially noticeable in my case, since I have my tags shown in a smaller font. This is cause by the fact that we use the `secondary-selection' face here which only highlights but inherits the rest from what is below. The idea was that these clock times should have the same color as the headline they belong to, but this idea is defeated when a line has tags with a very different face. This commit introduces a separate face for this purpose, so that users can customize it. --- lisp/ChangeLog | 7 +++++++ lisp/org-clock.el | 2 +- lisp/org-faces.el | 16 ++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ca6bae947..4fa5b824b 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2009-01-22 Carsten Dominik + + * org-clock.el (org-clock-put-overlay): Use new face instead of + `secondary-selection'. + + * org-faces.el (org-clock-overlay): New face. + 2009-01-21 Carsten Dominik * org-exp.el (org-get-current-options): Include the option for diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 1802ab432..754373d1e 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -605,7 +605,7 @@ will be easy to remove." (org-add-props (format fmt (make-string l ?*) h m (make-string (- 16 l) ?\ )) - '(face secondary-selection)) + (list 'face 'org-clock-overlay)) "")) (if (not (featurep 'xemacs)) (org-overlay-put ov 'display tx) diff --git a/lisp/org-faces.el b/lisp/org-faces.el index 14ddb7be4..409b159df 100644 --- a/lisp/org-faces.el +++ b/lisp/org-faces.el @@ -396,6 +396,22 @@ changes." :group 'org-faces :version "22.1") +(defface org-clock-overlay ;; copied from secondary-selection + (org-compatible-face nil + '((((class color) (min-colors 88) (background light)) + :background "yellow1") + (((class color) (min-colors 88) (background dark)) + :background "SkyBlue4") + (((class color) (min-colors 16) (background light)) + :background "yellow") + (((class color) (min-colors 16) (background dark)) + :background "SkyBlue4") + (((class color) (min-colors 8)) + :background "cyan" :foreground "black") + (t :inverse-video t)) + "Basic face for displaying the secondary selection." + :group 'org-faces)) + (defface org-agenda-structure ;; originally copied from font-lock-function-name-face (org-compatible-face nil '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))