From: asjo@koldfront.dk (Adam Sjøgren)
To: ding@gnus.org
Subject: Re: The Gnus logo in the modeline is displayed with a non-transparent background
Date: Mon, 26 Feb 2018 20:59:40 +0100 [thread overview]
Message-ID: <87k1uzmsib.fsf@tullinup.koldfront.dk> (raw)
In-Reply-To: <87tvu4sjmz.fsf@ericabrahamsen.net>
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!
So another self-inflicted wound...
Best regards,
Adam
--
"Mr. Cotton's... parrot. Same question." Adam Sjøgren
asjo@koldfront.dk
next prev parent reply other threads:[~2018-02-26 19:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-25 21:31 Adam Sjøgren
2018-02-25 22:39 ` Andreas Schwab
2018-02-25 23:06 ` Adam Sjøgren
2018-02-26 0:02 ` Eric Abrahamsen
2018-02-26 19:59 ` Adam Sjøgren [this message]
2018-02-26 20:18 ` Eric Abrahamsen
2018-03-24 22:38 ` Adam Sjøgren
2018-03-29 8:12 ` Eric Abrahamsen
2018-03-29 11:49 ` Adam Sjøgren
2018-03-29 12:09 ` Robert Pluim
2018-03-29 12:31 ` Adam Sjøgren
2018-03-29 14:04 ` Robert Pluim
2018-03-29 14:17 ` Adam Sjøgren
2018-03-29 16:19 ` Robert Pluim
2018-03-29 16:43 ` Adam Sjøgren
2018-03-30 7:39 ` Robert Pluim
2018-02-26 19:22 ` Andreas Schwab
2018-02-26 19:31 ` Adam Sjøgren
2018-02-25 23:22 ` Mike Kupfer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k1uzmsib.fsf@tullinup.koldfront.dk \
--to=asjo@koldfront.dk \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).