From: Juri Linkov Date: Fri, 16 Sep 2022 07:09:20 +0000 (+0300) Subject: Add outline open/close images (bug#57813) X-Git-Tag: emacs-29.0.90~1856^2~468 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8b29b296931a20ee9f3b3e19aab07ba71b9a12c1;p=emacs.git Add outline open/close images (bug#57813) * etc/images/outline-open.svg: * etc/images/outline-close.svg: New files. * lisp/outline.el (outline-open, outline-close): Use images outline-open.svg and outline-close.svg. * lisp/emacs-lisp/icons.el (icons--create): Add :ascent 'center'. --- diff --git a/etc/images/outline-close.svg b/etc/images/outline-close.svg new file mode 100644 index 00000000000..ea9157a5fb5 --- /dev/null +++ b/etc/images/outline-close.svg @@ -0,0 +1,6 @@ + +outline-close + + + + diff --git a/etc/images/outline-open.svg b/etc/images/outline-open.svg new file mode 100644 index 00000000000..75cf6aff9f9 --- /dev/null +++ b/etc/images/outline-open.svg @@ -0,0 +1,4 @@ + +outline-open + + diff --git a/lisp/emacs-lisp/icons.el b/lisp/emacs-lisp/icons.el index 93749a3451e..ff4f20c2071 100644 --- a/lisp/emacs-lisp/icons.el +++ b/lisp/emacs-lisp/icons.el @@ -202,7 +202,7 @@ present if the icon is represented by an image." :height (if (eq height 'line) (window-default-line-height) height) - :scale 1) + :scale 1 :ascent 'center) (create-image file)))))) (cl-defmethod icons--create ((_type (eql 'emoji)) icon _keywords) diff --git a/lisp/outline.el b/lisp/outline.el index c9d1a4ac64b..aee6f696b5b 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -292,16 +292,18 @@ buffers (yet) -- that will be amended in a future version." :safe #'booleanp :version "29.1") -(define-icon outline-open button - '((emoji "🔽") +(define-icon outline-open nil + '((image "outline-open.svg" :height 15 :ascent center) + (emoji "🔽") (symbol " ▼ ") (text " open ")) "Icon used for buttons for opening a section in outline buffers." :version "29.1" :help-echo "Open this section") -(define-icon outline-close button - '((emoji "▶️") +(define-icon outline-close nil + '((image "outline-close.svg" :height 15 :ascent center) + (emoji "▶️") (symbol " ▶ ") (text " close ")) "Icon used for buttons for closing a section in outline buffers."