소스 검색

Use :inverse-video t for `org-date-selected'.

* org.el (org-read-date): Set cursor-type to nil in the calendar.

* org-faces.el (org-date-selected): Use inverse video.  Don't explicitely
set bold to nil as it causes `customize-face' to show the weight property
and thus encourage the user to change it.  Warn in the docstring that using
bold might cause problems when displaying the calendar.

Using inverse video for the selected date might be too much for many
people, but with cursor-type set to nil (thanks to Toby Cubitt for this)
and with a light-weight font, we need to really highlight the selected
date -- and a simple color change is not catchy enough IMO.
Bastien Guerry 13 년 전
부모
커밋
c2a6f5de6e
2개의 변경된 파일8개의 추가작업 그리고 5개의 파일을 삭제
  1. 7 5
      lisp/org-faces.el
  2. 1 0
      lisp/org.el

+ 7 - 5
lisp/org-faces.el

@@ -287,12 +287,14 @@ column view defines special faces for each outline level.  See the file
 
 (defface org-date-selected
   (org-compatible-face nil
-    '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold nil))
-      (((class color) (min-colors 16) (background dark))  (:foreground "Pink" :bold nil))
-      (((class color) (min-colors 8)  (background light)) (:foreground "red"  :bold nil))
-      (((class color) (min-colors 8)  (background dark))  (:foreground "red"  :bold nil))
+    '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :inverse-video t))
+      (((class color) (min-colors 16) (background dark))  (:foreground "Pink" :inverse-video t))
+      (((class color) (min-colors 8)  (background light)) (:foreground "red"  :inverse-video t))
+      (((class color) (min-colors 8)  (background dark))  (:foreground "red"  :inverse-video t))
       (t (:inverse-video t))))
-  "Face for highlighting the calendar day when using `org-read-date'."
+  "Face for highlighting the calendar day when using `org-read-date'.
+Using a bold face here might cause discrepencies while displaying the
+calendar."
   :group 'org-faces)
 
 (defface org-sexp-date

+ 1 - 0
lisp/org.el

@@ -15122,6 +15122,7 @@ user."
       (save-excursion
 	(save-window-excursion
 	  (calendar)
+	  (org-eval-in-calendar '(setq cursor-type nil))
           (unwind-protect
               (progn
 		(calendar-forward-day (- (time-to-days org-def)