rougier / nano-theme

GNU Emacs / N Λ N O Theme
GNU General Public License v3.0
358 stars 35 forks source link

Some options in Magit popups are indiscernible #43

Closed luispauloml closed 1 year ago

luispauloml commented 1 year ago

Some of Magit's commands allow the user to set an option, such as the one for pulling changes from a repository (accessed via F in Magit's home buffer) as show in this figure:

before-customize

In this example, by pressing r the user can configure branch.master.rebase by cycling among any of three options: true, false, and pull.rebase:false. Magit uses a different font face to highlight which options is selected, as can be seen in the default theme. These faces are transient-value and transient-inactive-value, which belongs to the Transient package, the backend responsible for Magit's popups, and which are defined as:

(defface transient-value '((t :inherit font-lock-string-face))
  "Face used for values."
  :group 'transient-faces)

(defface transient-inactive-argument '((t :inherit shadow))
  "Face used for inactive arguments."
  :group 'transient-faces)

However, Nano redefines shadow and font-lock-string-face to inherit only nano-faded: https://github.com/rougier/nano-theme/blob/124ea271475556602ce293f788644a3e39b06f2f/nano-theme-support.el#L716 https://github.com/rougier/nano-theme/blob/124ea271475556602ce293f788644a3e39b06f2f/nano-theme-support.el#L771

This makes these two fonts indiscernible from each other. My solution was to customize only transient-value, making it inherit default:

(custom-set-faces '(transient-value ((t (:inherit default)))))

The result is this:

after-customize

I guess that as an end user, this is fine, but I would think that setting only a single font of a whole package and ignoring all the others is not recommended for theme package, and I do not know what to suggest to fix this.

rougier commented 1 year ago

Thanks. I didn't even know magit was doing this highlighting because I've never seen it... Coudl you make a PR with your changes?