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
View this message in rfc822 format
> From: Juri Linkov <juri <at> linkov.net>
> Cc: larsi <at> gnus.org, luangruo <at> yahoo.com, 50798 <at> debbugs.gnu.org
> Date: Tue, 28 Sep 2021 21:46:28 +0300
>
> >> The problem is that hovering mouse over the text property 'mouse-face'
> >> set to 'tab-line-highlight' that contains ':inherit' applies its face
> >> attributes such as :box :line-width twice thus shifting the image upwards.
> >
> > Sounds like a potential bug. Hod did you see that these attributes
> > were applied twice? And why applying the same attribute twice causes
> > effects that are different from applying it once?
>
> It was a guess that it's applied twice. Maybe there is another bug.
> At looked at the depths of 'note_mode_line_or_margin_highlight',
> but don't understand what is wrong. Some X coords are miscalculated
> when the mouse-face is inherited from the face with with :line-width 1.
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
keymap (keymap (13 . tab-line-select-tab)
(tab-line keymap (down-mouse-3 . tab-line-tab-context-menu)
(mouse-2 . tab-line-close-tab)
(down-mouse-1 . tab-line-select-tab)))
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)
keymap (keymap (tab-line keymap (mouse-2 . tab-line-close-tab)
(mouse-1 . tab-line-close-tab)))
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?
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.