Function: tab-bar--load-buttons

tab-bar--load-buttons is a byte-compiled function defined in tab-bar.el.gz.

Signature

(tab-bar--load-buttons)

Documentation

Load the icons for the tab buttons.

Source Code

;; Defined in /usr/src/emacs/lisp/tab-bar.el.gz
(defun tab-bar--load-buttons ()
  "Load the icons for the tab buttons."
  (require 'icons)
  (declare-function icon-string "icons" (name))
  (declare-function iconp "icons" (object))
  (declare-function icons--register "icons")
  (unless (iconp 'tab-bar-new)
    (define-icon tab-bar-new nil
      `((image "symbols/plus_16.svg" "tabs/new.xpm"
               :face shadow
               :height (1 . em)
               :margin ,tab-bar-button-margin
               :ascent center)
        ;; (emoji "➕")
        ;; (symbol "+")
        (text " + "))
      "Icon for creating a new tab."
      :version "29.1"
      :help-echo "New tab"))
  (setq tab-bar-new-button (icon-string 'tab-bar-new))

  (unless (iconp 'tab-bar-close)
    (define-icon tab-bar-close nil
      `((image "symbols/cross_16.svg" "tabs/close.xpm"
               :face shadow
               :height (1 . em)
               :margin ,tab-bar-button-margin
               :ascent center)
        ;; (emoji " ❌")
        ;; (symbol "✕") ;; "ⓧ"
        (text " x"))
      "Icon for closing the clicked tab."
      :version "29.1"
      :help-echo "Click to close tab"))
  (setq tab-bar-close-button (propertize (icon-string 'tab-bar-close)
                                         'close-tab t))

  (unless (iconp 'tab-bar-menu-bar)
    (define-icon tab-bar-menu-bar nil
      `((image "symbols/menu_16.svg"
               :height (1 . em)
               :margin ,tab-bar-button-margin
               :ascent center)
        ;; (emoji "🍔")
        (symbol "☰")
        (text "Menu" :face tab-bar-tab-inactive))
      "Icon for the menu bar."
      :version "29.1"
      :help-echo "Menu bar"))
  (setq tab-bar-menu-bar-button (icon-string 'tab-bar-menu-bar)))