From 1a74446c9396ef305f11c6cb07b94688a55577d9 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Fri, 22 Nov 2024 21:02:22 -0600 Subject: [PATCH] Change: (defface ement-room-list-direct, -name) :underline nil In some themes, faces these inherit from may have unwanted attributes (e.g. :underline for button). --- README.org | 4 ++++ ement-room-list.el | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index 95759c0e..3137d91e 100644 --- a/README.org +++ b/README.org @@ -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* diff --git a/ement-room-list.el b/ement-room-list.el index 256b4b0d..748d89a3 100644 --- a/ement-room-list.el +++ b/ement-room-list.el @@ -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 @@ -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) @@ -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)