From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Using images in tabs (was: bug#37385: 27.0.50; Crash on multibyte assertion violation) Date: Fri, 13 Sep 2019 09:22:57 +0300 Message-ID: <837e6c1zr2.fsf@gnu.org> References: <87tv9ir38c.fsf@mail.linkov.net> <83ftl11xdn.fsf@gnu.org> <87impxnqjm.fsf_-_@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="30133"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 13 08:22:52 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i8eyp-0007kA-WB for ged-emacs-devel@m.gmane.org; Fri, 13 Sep 2019 08:22:52 +0200 Original-Received: from localhost ([::1]:40598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8eyo-0007J3-7j for ged-emacs-devel@m.gmane.org; Fri, 13 Sep 2019 02:22:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53616) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8eyi-0007Iu-0c for emacs-devel@gnu.org; Fri, 13 Sep 2019 02:22:44 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48322) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i8eyh-0007JC-Eb; Fri, 13 Sep 2019 02:22:43 -0400 Original-Received: from [176.228.60.248] (port=2192 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i8eyg-0005cS-Qd; Fri, 13 Sep 2019 02:22:43 -0400 In-reply-to: <87impxnqjm.fsf_-_@mail.linkov.net> (message from Juri Linkov on Fri, 13 Sep 2019 00:18:37 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240008 Archived-At: > From: Juri Linkov > Cc: emacs-devel@gnu.org > Date: Fri, 13 Sep 2019 00:18:37 +0300 > > The biggest advantage of using “Unicode art” is its scalability for free, > i.e. scalable fonts keep the size of the character used in the close button > proportional to the font size of text in tabs. I agree that using characters is easier in several senses, but I think the results will be much better if we don't. E.g., what do you do if the font doesn't support that character, and how do you determine that in the first place? > I tried a small image with small font size and the result is not bad: > > But a small image with big font size looks too clumsy: Since Emacs 27 now supports native image scaling, you could use that to scale the image to the appropriate size. Alternatively, you could let users customize its size if needed: after all, changing the size of tab headers is something that should be relatively rare. > I don't know if the patch to vertically center line content > recently sent here by Jesse, could improve the look to align > the button image to the center of the text line in tabs. The image used should be centered to begin with. You could also try playing with :ascent property of images. > Another advantage of “Unicode art” is that on moving the mouse over the > close button the foreground color of its Unicode text changes to red > simply by using mouse-face. I don't know how to do the same with images: The same way we do it with tool-bar buttons, I'd say. The code for that is already in the display engine, you just need to reuse it. Or am I missing something?