GNU bug report logs - #76394
mouse-face property not working in tab-bar

Previous Next

Package: emacs;

Reported by: Ship Mints <shipmints <at> gmail.com>

Date: Tue, 18 Feb 2025 15:05:02 UTC

Severity: normal

Tags: patch

Full log


Message #148 received at 76394 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 76394 <at> debbugs.gnu.org
Subject: Re: bug#76394: mouse-face property not working in tab-bar
Date: Wed, 5 Mar 2025 12:26:34 -0500
[Message part 1 (text/plain, inline)]
On Wed, Mar 5, 2025 at 12:23 PM Juri Linkov <juri <at> linkov.net> wrote:

> >     > Given that text properties don't nest, I matched the faces and use
> >     separate
> >     > mouse-face properties for each component so they could be
> highlighted
> >     > separately.  Look at the attached screenshots.  You still might not
> >     like
> >     > it.  I also handled the case where the close button might be text
> >     only vs.
> >     > icon so it works for both.
> >
> >     Does using 'add-face-text-property' (like in
> >     'tab-bar-tab-name-format-face')
> >     instead of 'propertize' help to make the close button look like part
> of
> >     the tab?
> >
> > Nope.  I think the issue is that the mouse-face on the caption left of
> the
> > close button cannot itself highlight the whole string while
> simultaneously
> > having a mouse-face on the close button.  So we either live with the
> visual
> > separation which appears only when people mouse over caption segments, or
> > abandon mouse-face on the close button.  I prefer the visual separation
> as
> > it makes it clear the close button is separate from the caption text.
>
> Unfortunately, the visual separation is too ugly.  But maybe
> mouse-face on the close button is not needed, because hovering
> over the close button already has visual indication in the form
> of the raised button.
>

That's so only when the button is an icon and not text.

At this stage, I say I'll remove the close button mouse face and resubmit
the patch.  We can enhance later and people can customize for themselves.
The formatting functions are very flexible.
[Message part 2 (text/html, inline)]

This bug report was last modified 102 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.