From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/87908 Path: news.gmane.org!.POSTED!not-for-mail From: asjo@koldfront.dk (Adam =?utf-8?Q?Sj=C3=B8gren?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: The Gnus logo in the modeline is displayed with a non-transparent background Date: Sat, 24 Mar 2018 23:38:10 +0100 Organization: koldfront - analysis & revolution, Copenhagen, Denmark Message-ID: <87efk9qeul.fsf@tullinup.koldfront.dk> 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> <87lgffqzc1.fsf@ericabrahamsen.net> 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 1521931051 6357 195.159.176.226 (24 Mar 2018 22:37:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 24 Mar 2018 22:37:31 +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+m36122@lists.math.uh.edu Sat Mar 24 23:37:27 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 1ezrmw-0001Z4-7o for ding-account@gmane.org; Sat, 24 Mar 2018 23:37:26 +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 372b380c-2fb4-11e8-950a-b499baa2b07a; Sat, 24 Mar 2018 22:39:31 +0000 (UTC) Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.90_1) (envelope-from ) id 1ezrnv-0000US-SX; Sat, 24 Mar 2018 17:38:27 -0500 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.90_1) (envelope-from ) id 1ezrnr-0000Ty-Ol for ding@lists.math.uh.edu; Sat, 24 Mar 2018 17:38:23 -0500 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.90_1) (envelope-from ) id 1ezrnp-0005Da-RD for ding@lists.math.uh.edu; Sat, 24 Mar 2018 17:38:23 -0500 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 1ezrno-0005ul-Gh for ding@gnus.org; Sat, 24 Mar 2018 23:38:20 +0100 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1ezrlg-0000Op-Dg for ding@gnus.org; Sat, 24 Mar 2018 23:36:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 51 Original-X-Complaints-To: usenet@blaine.gmane.org OpenPGP: id=476630590A231909B0A0961A49D0746121BDE416; url=https://asjo.koldfront.dk/gpg.asc Mail-Follow-Up-To: never X-Now-Playing: The Lost World of the Suffragettes, Documentaries (BBC World Service) X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97,Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:87908 Archived-At: Eric writes: > 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! The only place the advice don't work is in the modeline, for me :-) > 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 think that is the type you use when you want to be able to scale the image... > 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? Good question, I can see that /usr/src/emacs/etc/images/gnus/gnus-pointer.xpm is the file loaded. Maybe I should just try skipping the advice for that file. find-image image before: (image :type xpm :file /usr/src/emacs/etc/images/gnus/gnus-pointer.xpm :ascent center) find-image spec after: (:type imagemagick :file /usr/src/emacs/etc/images/gnus/gnus-pointer.xpm :ascent center :width 27 :height 20) Modifying the advice thus gives the expected result: (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)))) (when (not (string= (plist-get spec :type) "xpm")) ; skip xpm files, such as emacs/etc/images/gnus/gnus-pointer.xpm (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))) Best regards, Adam -- "Vi sitter i samma bil Adam Sjøgren En silvergrå missil asjo@koldfront.dk En bomb i motsatt fil Vi sitter i samma bil"