branch: externals/frog-menu commit 6373133ced051089331106454425ab5e47e5970b Merge: 6abd002 0ba3279 Author: Clemens Radermacher <clem...@posteo.net> Commit: GitHub <nore...@github.com>
Merge pull request #2 from waymondo/master Add faces for posframe background and action keybindings --- frog-menu.el | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/frog-menu.el b/frog-menu.el index 4ad977d..e621b49 100644 --- a/frog-menu.el +++ b/frog-menu.el @@ -229,6 +229,14 @@ be drawn by single characters." '((t (:inherit default))) "Face used for menu actions.") +(defface frog-menu-action-keybinding-face + '((t (:inherit default))) + "Face used for menu action keybindings.") + +(defface frog-menu-posframe-background-face + '((t (:inherit default))) + "Face used for the background color of the posframe.") + (defvar frog-menu--buffer " *frog-menu-menu*" "Buffer used for the frog menu.") @@ -319,8 +327,13 @@ ACTIONS." (add-text-properties (point) (progn - (insert (car action) - "_" + (insert (car action)) + (point)) + '(face frog-menu-action-keybinding-face)) + (add-text-properties + (point) + (progn + (insert "_" (replace-regexp-in-string " " "_" (cadr action)) " ") @@ -383,7 +396,8 @@ Returns window of displayed buffer." (posframe-show buf :poshandler(or display-option #'posframe-poshandler-point-bottom-left-corner) - :internal-border-width 1) + :internal-border-width 1 + :background-color (face-attribute 'frog-menu-posframe-background-face :background)) (set-face-attribute 'internal-border (buffer-local-value 'posframe--frame buf) :inherit 'frog-menu-border)