Skip to content

Commit

Permalink
Change: (defface ement-room-list-direct, -name) :underline nil
Browse files Browse the repository at this point in the history
In some themes, faces these inherit from may have unwanted
attributes (e.g. :underline for button).
  • Loading branch information
alphapapa committed Nov 23, 2024
1 parent 66ecdfb commit 1a74446
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,10 @@ Ement.el doesn't support encrypted rooms natively, but it can be used transparen

+ Customization groups for faces. (Thanks to [[https://github.com/phil-s][Phil Sainty]].)

*Changes*

+ Disable underline for faces ~ement-room-list-direct~ and ~ement-room-list-name~ (in case a face they inherit from enables it, e.g. when themed).

** 0.16

*Compatibility*
Expand Down
7 changes: 5 additions & 2 deletions ement-room-list.el
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ Set automatically when `ement-room-list-mode' is activated.")

;;;;; Faces

;; TODO: Inherit from a single face to allow certain attributes to be disabled
;; (e.g. underline), in case a face inherited from has such attributes.

(defface ement-room-list-direct
;; We want to use `font-lock-constant-face' as the base face (because it seems to look
;; nice with most themes), but that face sometimes is defined as bold, which interferes
Expand All @@ -156,7 +159,7 @@ Set automatically when `ement-room-list-mode' is activated.")
(progn
(copy-face 'font-lock-constant-face 'ement--font-lock-constant-face)
(set-face-attribute 'ement--font-lock-constant-face nil :weight 'unspecified)
'((t (:inherit (ement--font-lock-constant-face ement-room-list-name)))))
'((t (:inherit (ement--font-lock-constant-face ement-room-list-name) :underline nil))))
"Direct rooms."
:group 'ement-room-list-faces)

Expand All @@ -179,7 +182,7 @@ Set automatically when `ement-room-list-mode' is activated.")
:group 'ement-room-list-faces)

(defface ement-room-list-name
'((t (:inherit (font-lock-function-name-face button))))
'((t (:inherit (font-lock-function-name-face button) :underline nil)))
"Non-direct rooms."
:group 'ement-room-list-faces)

Expand Down

0 comments on commit 1a74446

Please sign in to comment.