From 647e04e6ca072827f40f7c36756e9938eb2c1aa1 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 17 Jul 2022 19:05:29 +0200 Subject: [PATCH] Use material icons in main toolbar --- lisp/tool-bar.el | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el index 4445c193a21..065ff0188cc 100644 --- a/lisp/tool-bar.el +++ b/lisp/tool-bar.el @@ -274,25 +274,24 @@ holds a keymap." (defun tool-bar-setup () (setq tool-bar-separator-image-expression (tool-bar--image-expression "separator")) - (tool-bar-add-item-from-menu 'find-file "new" nil :label "New File" + (tool-bar-add-item-from-menu 'find-file (icons-get-filename "content/create") nil :label "New File" :vert-only t) - (tool-bar-add-item-from-menu 'menu-find-file-existing "open" nil + (tool-bar-add-item-from-menu 'menu-find-file-existing (icons-get-filename "file/folder") nil :label "Open" :vert-only t) - (tool-bar-add-item-from-menu 'dired "diropen" nil :vert-only t) - (tool-bar-add-item-from-menu 'kill-this-buffer "close" nil :vert-only t) - (tool-bar-add-item-from-menu 'save-buffer "save" nil - :label "Save") + (tool-bar-add-item-from-menu 'dired (icons-get-filename "content/inventory") nil :vert-only t) + (tool-bar-add-item-from-menu 'kill-this-buffer (icons-get-filename "navigation/close") nil :vert-only t) + (tool-bar-add-item-from-menu 'save-buffer (icons-get-filename "content/save") nil :vert-only t) (define-key-after (default-value 'tool-bar-map) [separator-1] menu-bar-separator) - (tool-bar-add-item-from-menu 'undo "undo" nil) + (tool-bar-add-item-from-menu 'undo (icons-get-filename "content/undo") nil :vert-only t) (define-key-after (default-value 'tool-bar-map) [separator-2] menu-bar-separator) (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [cut]) - "cut" nil :vert-only t) + (icons-get-filename "content/content_cut") nil :vert-only t) (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [copy]) - "copy" nil :vert-only t) + (icons-get-filename "content/content_copy") nil :vert-only t) (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [paste]) - "paste" nil :vert-only t) + (icons-get-filename "content/content_paste") nil :vert-only t) (define-key-after (default-value 'tool-bar-map) [separator-3] menu-bar-separator) - (tool-bar-add-item-from-menu 'isearch-forward "search" + (tool-bar-add-item-from-menu 'isearch-forward (icons-get-filename "action/search") nil :label "Search" :vert-only t) ;;(tool-bar-add-item-from-menu 'ispell-buffer "spell") @@ -307,7 +306,7 @@ holds a keymap." ;; (popup-menu menu-bar-help-menu)) ;; 'help ;; :help "Pop up the Help menu")) -) + ) (if (featurep 'move-toolbar) (defcustom tool-bar-position 'top -- 2.39.5