From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#50424: 27.2; Tab bar button mouse face not clearing entirely Date: Sun, 12 Sep 2021 10:06:09 +0300 Organization: LINKOV.NET Message-ID: <87zgsii8cy.fsf@mail.linkov.net> References: <87eea2cebb.fsf.ref@yahoo.com> <87eea2cebb.fsf@yahoo.com> <83eea2rn8z.fsf@gnu.org> <87h7exc2dk.fsf@yahoo.com> <83lf49r4bc.fsf@gnu.org> <87czplb51o.fsf@yahoo.com> <83ilzcpt0d.fsf@gnu.org> <83mtonob41.fsf@gnu.org> <87tuiryn17.fsf@mail.linkov.net> <831r5uhpd3.fsf@gnu.org> <8735qazyjv.fsf@mail.linkov.net> <83zgsifob4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32150"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: luangruo@yahoo.com, 50424@debbugs.gnu.org, alan@idiocy.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 12 09:10:44 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 1mPJdT-0008DW-Jg for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Sep 2021 09:10:43 +0200 Original-Received: from localhost ([::1]:52354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPJdS-00068c-81 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Sep 2021 03:10:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPJbr-0004ph-HD for bug-gnu-emacs@gnu.org; Sun, 12 Sep 2021 03:09:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58583) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPJbq-00019u-6Z for bug-gnu-emacs@gnu.org; Sun, 12 Sep 2021 03:09:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mPJbp-0003UI-MZ for bug-gnu-emacs@gnu.org; Sun, 12 Sep 2021 03:09:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Sep 2021 07:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50424 X-GNU-PR-Package: emacs Original-Received: via spool by 50424-submit@debbugs.gnu.org id=B50424.163143053613396 (code B ref 50424); Sun, 12 Sep 2021 07:09:01 +0000 Original-Received: (at 50424) by debbugs.gnu.org; 12 Sep 2021 07:08:56 +0000 Original-Received: from localhost ([127.0.0.1]:41896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPJbk-0003Tz-4L for submit@debbugs.gnu.org; Sun, 12 Sep 2021 03:08:56 -0400 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:59189) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPJbi-0003Tk-4l for 50424@debbugs.gnu.org; Sun, 12 Sep 2021 03:08:54 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 6D99C1C0003; Sun, 12 Sep 2021 07:08:45 +0000 (UTC) In-Reply-To: <83zgsifob4.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 12 Sep 2021 06:46:55 +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:214117 Archived-At: --=-=-= Content-Type: text/plain >> >> With enlarged height and width, now the buttons are not vertically >> >> aligned: >> > >> > Is this a screenshot of a tab bar or of a tab line? >> >> Tab bar. And the change was caused by your commit db74a93659. > > Then I don't understand the two horizontally-adjacent images. What > are they? two separate frame? If they are two frames, then where are > the frame decorations? In short, I don't understand what am I seeing > there, and how did you get this display. These are two separate images that show the changed tab dimensions before changes when :margin was (2 . 0), and after changes when now :margin is 4. > And also, when you say "buttons are not vertically aligned", what > exactly do you mean? Not aligned with what? Now buttons are not aligned to the baseline, and thus are not centered vertically anymore. >> db74a93659 that contains such changes: >> >> - :margin (2 . 0) >> + :margin ,tab-bar-button-margin > > This is to make the code do what the variable's documentation says. > Without that change, the images were sized using :margin '(2 . 0)', > but the C code used the value of tab-bar-button-margin, a simple > scalar, to place the image and clear its background. The way to > affect the image dimensions is by changing the value of > tab-bar-button-margin, not by hard-coding the margin in the image > properties. This patch restores the original tab dimensions, while also keeps fixed the reported problem of mouse face not clearing entirely: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=tab-bar-button-margin.patch diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 8be08d4b8b..edbadec09d 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -161,7 +161,7 @@ tab-bar--load-buttons (add-text-properties 0 (length tab-bar-new-button) `(display (image :type xpm :file "tabs/new.xpm" - :margin ,tab-bar-button-margin + :margin ,(cons tab-bar-button-margin 0) :ascent center)) tab-bar-new-button)) @@ -171,7 +171,7 @@ tab-bar--load-buttons (add-text-properties 0 (length tab-bar-close-button) `(display (image :type xpm :file "tabs/close.xpm" - :margin ,tab-bar-button-margin + :margin ,(cons tab-bar-button-margin 0) :ascent center)) tab-bar-close-button))) @@ -1659,7 +1659,7 @@ tab-bar-history-mode (add-text-properties 0 (length tab-bar-back-button) `(display (image :type xpm :file "tabs/left-arrow.xpm" - :margin ,tab-bar-button-margin + :margin ,(cons tab-bar-button-margin 0) :ascent center)) tab-bar-back-button)) (when (and tab-bar-mode (not (get-text-property 0 'display tab-bar-forward-button))) @@ -1667,7 +1667,7 @@ tab-bar-history-mode (add-text-properties 0 (length tab-bar-forward-button) `(display (image :type xpm :file "tabs/right-arrow.xpm" - :margin ,tab-bar-button-margin + :margin ,(cons tab-bar-button-margin 0) :ascent center)) tab-bar-forward-button)) diff --git a/src/dispextern.h b/src/dispextern.h index f4c7575b35..0ede76ebf5 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3202,7 +3202,7 @@ #define IMAGE_CACHE_BUCKETS_SIZE 1001 /* Default values of the above variables. */ -#define DEFAULT_TAB_BAR_BUTTON_MARGIN 4 +#define DEFAULT_TAB_BAR_BUTTON_MARGIN 2 #define DEFAULT_TAB_BAR_BUTTON_RELIEF 1 /* The height in pixels of the default tab-bar images. */ --=-=-=--