GNU bug report logs - #50798
28.0.50; Tab line close button is off-center until it is highlighted with the mouse

Previous Next

Package: emacs;

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 #38 received at 50798 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 50798 <at> debbugs.gnu.org
Subject: Re: bug#50798: 28.0.50; Tab line close button is off-center until
 it is highlighted with the mouse
Date: Mon, 27 Sep 2021 18:39:13 +0300
>> >> Try starting Emacs with a larger font, then.  As in
>> >>
>> >>   emacs -Q -fn "FOO-18"
>> >>
>> >> where FOO is the font you get by default, like "DejaVu Sans Mono" or
>> >> something.
>> >
>> > I'm still not seeing any difference whether the mouse is over the x or
>> > not.
>>
>> I can reproduce this with a very big font on the tab-line, but not tab-bar.
>
> We _are_ talking about the tab-line.

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.

This patch fixes the problem by copying face attributes from
the inherited face directly to the face used by 'mouse-face':

diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index 4a751b384e..3993e625c9 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -119,7 +119,11 @@ tab-line-tab-current
   :group 'tab-line-faces)
 
 (defface tab-line-highlight
-  '((t :inherit tab-line-tab))
+  '((((class color) (min-colors 88))
+     :box (:line-width 1 :style released-button)
+     :background "grey85"
+     :foreground "black")
+    (t :inverse-video nil))
   "Tab line face for highlighting."
   :version "27.1"
   :group 'tab-line-faces)
-- 




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.