From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#50798: 28.0.50; Tab line close button is off-center until it is highlighted with the mouse Date: Sat, 02 Oct 2021 13:08:36 +0300 Message-ID: <834k9zd9i3.fsf@gnu.org> References: <8735ptxhzs.fsf.ref@yahoo.com> <8735ptxhzs.fsf@yahoo.com> <87wnn5m8eo.fsf@gnus.org> <83wnn5qe48.fsf@gnu.org> <87k0j5m5ik.fsf@gnus.org> <83tui9qd2j.fsf@gnu.org> <87fsttm512.fsf@gnus.org> <87y27kbi6y.fsf@mail.linkov.net> <83a6k0phik.fsf@gnu.org> <878rzi11xq.fsf@mail.linkov.net> <83lf3hlv5o.fsf@gnu.org> <87czoso8cz.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37794"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, larsi@gnus.org, 50798@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 02 12:11:07 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mWbz1-0009dN-Rl for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 Oct 2021 12:11:07 +0200 Original-Received: from localhost ([::1]:40500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWbz0-00026j-Iz for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 Oct 2021 06:11:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWbxz-00022N-9N for bug-gnu-emacs@gnu.org; Sat, 02 Oct 2021 06:10:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46347) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWbxy-0002pa-MW for bug-gnu-emacs@gnu.org; Sat, 02 Oct 2021 06:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWbxy-00078H-DL for bug-gnu-emacs@gnu.org; Sat, 02 Oct 2021 06:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Oct 2021 10:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50798 X-GNU-PR-Package: emacs Original-Received: via spool by 50798-submit@debbugs.gnu.org id=B50798.163316934427344 (code B ref 50798); Sat, 02 Oct 2021 10:10:02 +0000 Original-Received: (at 50798) by debbugs.gnu.org; 2 Oct 2021 10:09:04 +0000 Original-Received: from localhost ([127.0.0.1]:57893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWbx2-00076y-6i for submit@debbugs.gnu.org; Sat, 02 Oct 2021 06:09:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWbwy-00076Q-N6 for 50798@debbugs.gnu.org; Sat, 02 Oct 2021 06:09:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48986) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWbwt-0001Rp-7c; Sat, 02 Oct 2021 06:08:55 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1518 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWbws-00044h-Qm; Sat, 02 Oct 2021 06:08:55 -0400 In-Reply-To: <87czoso8cz.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 28 Sep 2021 21:46:28 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:216119 Archived-At: > From: Juri Linkov > Cc: larsi@gnus.org, luangruo@yahoo.com, 50798@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 # 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 # 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?