all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Yuan Fu <casouri@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
	Stefan Kangas <stefankangas@gmail.com>,
	62562@debbugs.gnu.org
Subject: bug#62562: 30.0.50; [PATCH] Some new SVG icons
Date: Mon, 03 Apr 2023 09:37:32 +0300	[thread overview]
Message-ID: <86lej9a2tv.fsf@mail.linkov.net> (raw)
In-Reply-To: <86355ieljw.fsf@mail.linkov.net> (Juri Linkov's message of "Sun,  02 Apr 2023 19:27:15 +0300")

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

>> Also CC’ing Juri, since I think maybe tab-bar can take advantage of some
>> of these icons :-)
>
> After adapting new icons to tab-bar they look nice.
> I invite everyone to try out this patch to see
> how good they look:

Actually, now buttons are too saturated and attract too much attention,
so here is a better appearance where they are dimmed by the shadow face,
and corresponding code changes that allow this:


[-- Attachment #2: tab-bar-symbols-shadow.patch --]
[-- Type: text/x-diff, Size: 3238 bytes --]

diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 7c3069ca269..c42917d51a0 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -162,7 +162,8 @@ tab-bar--load-buttons
   (declare-function icons--register "icons")
   (unless (iconp 'tab-bar-new)
     (define-icon tab-bar-new nil
-      `((image "tabs/new.xpm"
+      `((image "symbols/plus_16.svg" "tabs/new.xpm"
+               :face shadow
                :margin ,tab-bar-button-margin
                :ascent center)
         ;; (emoji "➕")
@@ -175,7 +176,8 @@ tab-bar--load-buttons
 
   (unless (iconp 'tab-bar-close)
     (define-icon tab-bar-close nil
-      `((image "tabs/close.xpm"
+      `((image "symbols/cross_16.svg" "tabs/close.xpm"
+               :face shadow
                :margin ,tab-bar-button-margin
                :ascent center)
         ;; (emoji " ❌")
@@ -189,7 +191,10 @@ tab-bar--load-buttons
 
   (unless (iconp 'tab-bar-menu-bar)
     (define-icon tab-bar-menu-bar nil
-      '(;; (emoji "🍔")
+      `((image "symbols/menu_16.svg"
+               :margin ,tab-bar-button-margin
+               :ascent center)
+        ;; (emoji "🍔")
         (symbol "☰")
         (text "Menu" :face tab-bar-tab-inactive))
       "Icon for the menu bar."
@@ -717,16 +722,17 @@ tab-bar-tab-name-format-function
   :version "28.1")
 
 (defun tab-bar-tab-name-format-default (tab i)
-  (let ((current-p (eq (car tab) 'current-tab)))
-    (propertize
-     (concat (if tab-bar-tab-hints (format "%d " i) "")
-             (alist-get 'name tab)
-             (or (and tab-bar-close-button-show
-                      (not (eq tab-bar-close-button-show
-                               (if current-p 'non-selected 'selected)))
-                      tab-bar-close-button)
-                 ""))
-     'face (funcall tab-bar-tab-face-function tab))))
+  (let* ((current-p (eq (car tab) 'current-tab))
+         (name (concat (if tab-bar-tab-hints (format "%d " i) "")
+                       (alist-get 'name tab)
+                       (or (and tab-bar-close-button-show
+                                (not (eq tab-bar-close-button-show
+                                         (if current-p 'non-selected 'selected)))
+                                tab-bar-close-button)
+                           ""))))
+    (add-face-text-property
+     0 (length name) (funcall tab-bar-tab-face-function tab) t name)
+    name))
 
 (defcustom tab-bar-format '(tab-bar-format-history
                             tab-bar-format-tabs
@@ -2133,7 +2146,7 @@ tab-bar-history-mode
 
         (unless (iconp 'tab-bar-back)
           (define-icon tab-bar-back nil
-            `((image "tabs/left-arrow.xpm"
+            `((image "symbols/chevron_left_16.svg" "tabs/left-arrow.xpm"
                      :margin ,tab-bar-button-margin
                      :ascent center)
               (text " < "))
@@ -2143,7 +2156,7 @@ tab-bar-history-mode
 
         (unless (iconp 'tab-bar-forward)
           (define-icon tab-bar-forward nil
-            `((image "tabs/right-arrow.xpm"
+            `((image "symbols/chevron_right_16.svg" "tabs/right-arrow.xpm"
                      :margin ,tab-bar-button-margin
                      :ascent center)
               (text " > "))

  reply	other threads:[~2023-04-03  6:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-31  5:52 bug#62562: 30.0.50; [PATCH] Some new SVG icons Yuan Fu
2023-03-31  6:12 ` Eli Zaretskii
2023-04-01 19:38 ` Yuan Fu
2023-04-01 19:41   ` Yuan Fu
2023-04-02  6:56     ` Juri Linkov
2023-04-02  7:06   ` Eli Zaretskii
2023-04-02 22:05     ` Yuan Fu
2023-04-02 16:27   ` Juri Linkov
2023-04-03  6:37     ` Juri Linkov [this message]
2023-04-03  7:55       ` Yuan Fu
2023-04-03 16:23         ` Juri Linkov
2023-04-03 20:17           ` Yuan Fu
2023-04-04  6:50             ` Juri Linkov
2023-05-02 17:10               ` Juri Linkov
2023-08-27 17:27                 ` Juri Linkov
2023-08-27 21:42                   ` Yuan Fu
2023-08-31 21:00                     ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-01  6:58                       ` 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

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

  git send-email \
    --in-reply-to=86lej9a2tv.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=62562@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=eliz@gnu.org \
    --cc=stefankangas@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.