Skip to content

Commit d99fe41

Browse files
authored
Ensure correct alignment of cheatsheet layout (#341)
* Redefine `meow-cheatsheet-command' face to inherit from `fixed-pitch' * Update `meow-cheatsheet-highlight' face to inherit from `meow-cheatsheet-command' * Adjust `meow-cheatsheet' command to set height by face setting * Create new face for "Frame is too narrow" message issued by `meow--describe-keymap-format'
1 parent dae2baa commit d99fe41

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

meow-cheatsheet.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Currently `meow-cheatsheet-layout-qwerty', `meow-cheatsheet-layout-dvorak',
134134
(goto-char (point-max))
135135
(insert meow--cheatsheet-note)
136136
(insert (meow--render-cheatsheet-thing-table))
137-
(put-text-property (point-min) (point-max) 'display '(height 0.8))
137+
(add-face-text-property (point-min) (point-max) 'meow-cheatsheet-command)
138138
(setq buffer-read-only t))
139139
(switch-to-buffer buf)))))
140140

meow-face.el

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@
9898
"Keypad state cursor."
9999
:group 'meow)
100100

101+
(defface meow-keypad-cannot-display
102+
'((((class color) (background dark))
103+
(:height 0.7 :foreground "grey90"))
104+
(((class color) (background light))
105+
(:height 0.7 :foreground "grey10")))
106+
"Face for Meow keypad message when cannot display popup."
107+
:group 'meow)
108+
101109
(defface meow-beacon-cursor
102110
'((((class color) (background dark))
103111
(:inherit cursor))
@@ -204,18 +212,15 @@
204212
:group 'meow)
205213

206214
(defface meow-cheatsheet-command
207-
'((((class color) (background dark))
208-
(:height 0.7 :foreground "grey90"))
209-
(((class color) (background light))
210-
(:height 0.7 :foreground "grey10")))
215+
'((t (:inherit fixed-pitch :height 90)))
211216
"Face for Meow cheatsheet command."
212217
:group 'meow)
213218

214219
(defface meow-cheatsheet-highlight
215220
'((((class color) (background dark))
216-
(:foreground "grey90"))
221+
(:foreground "grey90" :inherit meow-cheatsheet-command))
217222
(((class color) (background light))
218-
(:foreground "grey10")))
223+
(:foreground "grey10" :inherit meow-cheatsheet-command)))
219224
"Face for Meow cheatsheet highlight text."
220225
:group 'meow)
221226

meow-keypad.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@
277277
def))))
278278
(meow--string-join " "))))
279279
(meow--string-join "\n"))
280-
(propertize "Frame is too narrow for KEYPAD popup" 'face 'meow-cheatsheet-command))))
280+
(propertize "Frame is too narrow for KEYPAD popup" 'face 'meow-keypad-cannot-display))))
281281

282282

283283

0 commit comments

Comments
 (0)