From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/87891 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: The Gnus logo in the modeline is displayed with a non-transparent background Date: Mon, 26 Feb 2018 12:18:38 -0800 Message-ID: <87lgffqzc1.fsf@ericabrahamsen.net> References: <87h8q4wybs.fsf@tullinup.koldfront.dk> <87371o8zj8.fsf@linux-m68k.org> <87woz07jps.fsf@tullinup.koldfront.dk> <87tvu4sjmz.fsf@ericabrahamsen.net> <87k1uzmsib.fsf@tullinup.koldfront.dk> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1519676366 19127 195.159.176.226 (26 Feb 2018 20:19:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 26 Feb 2018 20:19:26 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: ding@gnus.org Original-X-From: ding-owner+m36105@lists.math.uh.edu Mon Feb 26 21:19:22 2018 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from mxfilter-048034.atla03.us.yomura.com ([107.189.48.34]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eqPF3-0004lH-OL for ding-account@gmane.org; Mon, 26 Feb 2018 21:19:21 +0100 X-Yomura-MXScrub: 1.0 Original-Received: from lists1.math.uh.edu (unknown [129.7.128.208]) by mxfilter-048034.atla03.us.yomura.com (Halon) with ESMTPS id 9ed3cea5-1b32-11e8-82b2-b499baa2b07a; Mon, 26 Feb 2018 20:21:26 +0000 (UTC) Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.89) (envelope-from ) id 1eqPGp-0005NG-QJ; Mon, 26 Feb 2018 14:21:11 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1eqPGn-0005MZ-7S for ding@lists.math.uh.edu; Mon, 26 Feb 2018 14:21:09 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.89) (envelope-from ) id 1eqPGm-0008LK-6x for ding@lists.math.uh.edu; Mon, 26 Feb 2018 14:21:09 -0600 Original-Received: from [195.159.176.226] (helo=blaine.gmane.org) by quimby.gnus.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1eqPGk-00083y-Ve for ding@gnus.org; Mon, 26 Feb 2018 21:21:07 +0100 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eqPEg-0002rz-T8 for ding@gnus.org; Mon, 26 Feb 2018 21:18:58 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 49 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:a3RLNAYwL+kJhCF9qqbKnDIenpw= X-Spam-Score: 0.5 (/) X-Spam-Report: SpamAssassin (3.4.1 2015-04-28) analysis follows Bayesian score: 0.0444 Ham tokens: 0.000-157--5767h-0s--0d--H*M:fsf, 0.000-19--668h-0s--0d--Scale, 0.000-12--424h-0s--0d--transparent, 0.000-9--313h-0s--0d--H*UA:Emacs, 0.000-9--309h-0s--0d--H*u:Emacs Spam tokens: 0.997-17065--328h-14241s--0d--HX-Envelope-From:sk:junkmas, 0.997-17065--328h-14241s--0d--Hx-spam-relays-internal:sk:junkmas, 0.997-17065--328h-14241s--0d--H*RT:sk:junkmas, 0.997-29545--571h-24659s--0d--H*r:quimby.gnus.org, 0.995-30477--954h-25736s--0d--HTo:D*gnus.org Autolearn status: no autolearn_force=no 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.5 BAYES_05 BODY: Bayes spam probability is 1 to 5% [score: 0.0444] 0.8 RDNS_NONE Delivered to internal network by a host with no rDNS List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:87891 Archived-At: asjo@koldfront.dk (Adam Sjøgren) writes: > Ah! Found the reason! > > When I got a "HiDPI" screen for the first time, Katsumi helped me with > these two defadvice, to scale images: > > (defadvice create-image (after scale-image-size activate) > "Scale the image size." > (condition-case nil > (let* ((magnitude (frame-parameter nil 'image-dpi-scale-magnitude)) > (image (copy-sequence ad-return-value)) > (size (image-size image t)) > (spec (cdr image)) > (image-width (or (plist-get spec :width) (car size))) > (image-height (or (plist-get spec :height) (cdr size)))) > (plist-put spec :width (round (* image-width magnitude))) > (plist-put spec :height (round (* image-height magnitude))) > (plist-put spec :type 'imagemagick) > (setq ad-return-value image)) > (error nil))) > > (defadvice find-image (after scale-image-size activate) > "Scale the image size." > (condition-case nil > (let* ((magnitude (frame-parameter nil 'image-dpi-scale-magnitude)) > (image (copy-sequence ad-return-value)) > (size (image-size image t)) > (spec (cdr image)) > (image-width (or (plist-get spec :width) (car size))) > (image-height (or (plist-get spec :height) (cdr size)))) > (plist-put spec :width (round (* image-width magnitude))) > (plist-put spec :height (round (* image-height magnitude))) > (plist-put spec :type 'imagemagick) > (setq ad-return-value image)) > (error nil))) > > If I remove those (all images are too small, but) the image in the > modeline is transparent! Huh, now that you mention it, I see all the images are too small on my (hdpi) monitor, too. Oh well, at least they're transparent! I wonder if you could play with that `find-image' advice and make it work. Isn't 'imagemagick an odd :type for the image found? I wonder if that's necessary to make the re-scaling work correctly. What happens if you hard-code it to 'xpm, just for this case? Eric