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.
This commit is contained in:
Bastien Guerry 2012-04-22 07:54:32 +02:00
parent eabf8984be
commit c2a6f5de6e
2 changed files with 8 additions and 5 deletions

View File

@ -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

View File

@ -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)