GNU bug report logs -
#50798
28.0.50; Tab line close button is off-center until it is highlighted with the mouse
Previous Next
Reported by: Po Lu <luangruo <at> yahoo.com>
Date: Sat, 25 Sep 2021 06:55:02 UTC
Severity: normal
Found in version 28.0.50
Fixed in version 28.0.60
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #50 received at 50798 <at> debbugs.gnu.org (full text, mbox):
> Please tell more about what you saw there. Which X coordinates are
> miscalculated?
>
> And I don't think I understand the arrangement with faces for the
> close button. tab-line.el says:
>
> (defvar tab-line-close-button
> (propertize " x"
> 'display '(image :type xpm
> :file "tabs/close.xpm"
> :margin (2 . 0)
> :ascent center)
> 'keymap tab-line-tab-close-map
> 'mouse-face 'tab-line-close-highlight
> 'help-echo "Click to close tab")
> "Button for closing the clicked tab.")
>
> which seems to mean we should use 'tab-line-close-highlight' as the
> mouse-face for this button. But if I invoke (tab-line-format), which
> seems to be what calculates the tab-line-format, I see this:
>
> (#(" xdisp.c x"
> 1 8
> (tab #<buffer xdisp.c>
> face tab-line-tab-inactive
> mouse-face tab-line-highlight
> follow-link ignore)
> 8 10
> (tab #<buffer xdisp.c>
> face tab-line-tab-inactive
> display (image :type xpm :file "tabs/close.xpm" :margin (2 . 0) :ascent center)
> mouse-face tab-line-highlight ...
>
> which seems to say we actually use the 'tab-line-highlight' face
> instead for the close button?
>
> Could you please describe how mouse-highlight faces are supposed to
> work with tab-line close buttons, and preferably walk me through the
> relevant code?
'tab-line-close-highlight' was supposed to be applied to the close button
to emulate how the close button behaves on the tab bar where hovering mouse
over the button displays it with the face style 'released-button'.
But mouse-face of the face 'tab-line-highlight' overrides the mouse-face
'tab-line-close-highlight' in 'tab-line-tab-name-format-default'
that applies 'propertize' with 'mouse-face tab-line-highlight'.
And I can't find a way how to keep the existing 'mouse-face' property on
the close button while applying 'mouse-face tab-line-highlight' to the
rest of the tab.
This bug report was last modified 3 years and 227 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.