summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-10-09 19:07:30 +0300
committerThanos Apollo <[email protected]>2024-10-09 19:07:30 +0300
commit505ce5cff58923acec6e83351042f2b1d150f65c (patch)
tree664a2b95261d47e38a71d32677e3850bfaa4c2df
parenteee16dee4d02eaa9ef9eda25dd0ed64638db0828 (diff)
Add gnosis-face-dashboard-header.HEADmaster
* Refactor gnosis-dashboard-header-face as part of gnosis-face group & rename to gnosis-face-dashboard-header.
-rw-r--r--gnosis.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/gnosis.el b/gnosis.el
index 7595c6d..0efd544 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -306,6 +306,14 @@ When nil, review new notes last."
"Face for review action *quit*."
:group 'gnosis-face)
+(defface gnosis-face-dashboard-header
+ '((t :foreground "#ff0a6a" :weight bold))
+ "Face for dashboard header.
+
+Avoid using an increased height value as this messes up with
+`gnosis-center-string' implementation"
+ :group 'gnosis-face)
+
(cl-defun gnosis-select (value table &optional (restrictions '1=1) (flatten nil))
"Select VALUE from TABLE, optionally with RESTRICTIONS.
@@ -2592,10 +2600,6 @@ If STRING-SECTION is nil, apply FACE to the entire STRING."
;; Dashboard
;;;;;;;;;;;;
-(defface gnosis-dashboard-header-face
- '((t :foreground "#ff0a6a" :weight bold))
- "My custom face for both light and dark backgrounds.")
-
(defvar gnosis-dashboard-note-ids nil
"Store note ids for dashboard.")
@@ -3033,7 +3037,8 @@ DASHBOARD-TYPE: either 'Notes' or 'Decks' to display the respective dashboard."
(with-current-buffer buffer
(widget-insert "\n"
(gnosis-center-string
- (format "%s" (propertize "Gnosis Dashboard" 'face 'gnosis-dashboard-header-face))))
+ (format "%s" (propertize "Gnosis Dashboard" 'face
+ 'gnosis-face-dashboard-header))))
(gnosis-insert-separator)
;; (widget-insert (gnosis-center-string (propertize "Stats:" 'face 'underline)) "\n\n")
(widget-insert (gnosis-center-string