unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: 57813@debbugs.gnu.org
Subject: bug#57813: Icon images are non-functional
Date: Thu, 15 Sep 2022 22:53:07 +0300	[thread overview]
Message-ID: <867d2476u4.fsf@mail.linkov.net> (raw)
In-Reply-To: <861qsca9cn.fsf@mail.linkov.net> (Juri Linkov's message of "Thu,  15 Sep 2022 19:30:32 +0300")

[-- Attachment #1: Type: text/plain, Size: 147 bytes --]

> Fixed now in 471414fe6b.

Since now images can be displayed in outlines,
here is a patch that adds nice images to outlines
that look like this:


[-- Attachment #2: outlines.png --]
[-- Type: image/png, Size: 73601 bytes --]

[-- Attachment #3: outline-svg.patch --]
[-- Type: text/x-diff, Size: 2185 bytes --]

diff --git a/etc/images/outline-close.svg b/etc/images/outline-close.svg
new file mode 100644
index 0000000000..ea9157a5fb
--- /dev/null
+++ b/etc/images/outline-close.svg
@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
+<title>outline-close</title>
+<g transform="rotate(-90, 10, 10)">
+<path d="m17.5 4.75-7.5 7.5-7.5-7.5L1 6.25l9 9 9-9z"/>
+</g>
+</svg>
diff --git a/etc/images/outline-open.svg b/etc/images/outline-open.svg
new file mode 100644
index 0000000000..75cf6aff9f
--- /dev/null
+++ b/etc/images/outline-open.svg
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
+<title>outline-open</title>
+<path d="m17.5 4.75-7.5 7.5-7.5-7.5L1 6.25l9 9 9-9z"/>
+</svg>
diff --git a/lisp/emacs-lisp/icons.el b/lisp/emacs-lisp/icons.el
index 93749a3451..ff4f20c207 100644
--- a/lisp/emacs-lisp/icons.el
+++ b/lisp/emacs-lisp/icons.el
@@ -202,7 +202,7 @@ icons--create
                             :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 b19e0cf811..364c3bee84 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -292,16 +295,18 @@ outline-minor-mode-use-buttons
   :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."

  parent reply	other threads:[~2022-09-15 19:53 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14 19:40 bug#57813: Icon images are non-functional Juri Linkov
2022-09-15 16:30 ` Juri Linkov
2022-09-15 16:36   ` Juri Linkov
2022-09-15 16:53     ` Eli Zaretskii
2022-09-15 17:35       ` Juri Linkov
2022-09-15 18:32         ` Eli Zaretskii
2022-09-15 19:46           ` Juri Linkov
2022-09-16 16:16             ` Juri Linkov
2022-09-15 19:53   ` Juri Linkov [this message]
2022-09-16  5:29     ` Eli Zaretskii
2022-09-16  7:09       ` Juri Linkov
2022-09-17 19:37         ` Juri Linkov
2022-09-18  5:08           ` Eli Zaretskii
2022-09-18 18:46             ` Juri Linkov
2022-09-18  5:17           ` Eli Zaretskii
2022-09-18 19:06             ` Juri Linkov
2022-09-19 12:12               ` Eli Zaretskii
2022-09-19 19:37                 ` Juri Linkov
2022-09-20 11:31                   ` Eli Zaretskii
2022-09-20 16:12                     ` Juri Linkov
2022-09-23 15:48     ` Juri Linkov
2022-09-23 16:26       ` Lars Ingebrigtsen
2022-09-24 17:17         ` Juri Linkov
2022-10-12 14:42           ` Max Brieiev
2022-10-12 18:55             ` Juri Linkov
2022-10-23 16:55               ` Juri Linkov
2022-10-13  7:51 ` Juri Linkov
2022-10-18 18:14   ` Juri Linkov
2022-10-18 18:35     ` Juri Linkov
2022-10-19  6:44       ` Juri Linkov
2022-10-22 18:38         ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=867d2476u4.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=57813@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).