Re: Styling tabs with background image, or with stipples with different foreground color?

Stéphane Marks <[email protected]>
Newsgroups gmane.emacs.help
Message-ID <CAN+1HbpO55rUEbUz+KmseC+h-JVgNDJ7Di6-KX=qcz5uw2YzYA@mail.gmail.com>
On Wed, Apr 8, 2026 at 4:28 PM Frank Steiner <[email protected]>
wrote:

> Stéphane Marks wrote:
>
> > I put an overline on the active tab
> >
> >        (set-face-attribute 'tab-bar-tab nil :overline xxx)
> > ...
> > To put the overline on an inactive tab change the face to be
> 'tab-bar-tab-inactive.
>
> The problem is not creating overlines with different colors for current
> an inactive tabs (note: I'm talking about tab-line tabs, but I guess that's
> the same with tab-bar).
>
> The question is how to set the overlines to different heights. Whenever
> enlarging any tab (by e.g. chosing a larger font size *only* for the
> current tab)
> *all* tabs will grow and so the overlines will always all be at the same
> height.
>

Gotcha.  I don't think Emacs supports differing overline heights.

That said, you can create your own function and add it
to tab-bar-tab-name-format-functions that alters the face for the active
tab to change its height.  The whole line will change height if they're not
all the same but I sense you know that.

(defun my/tab-bar-tab-name-format-fancy (name tab _i)
  (propertize name 'face (list :height
                               (if (eq (car tab) 'current-tab) 2.0 1.0))))

(setq tab-bar-tab-name-format-functions
      (list #'tab-bar-tab-name-format-hints
            #'my/tab-bar-tab-name-format-fancy
            #'tab-bar-tab-name-format-face
            #'tab-bar-tab-name-format-close-button))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.