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: Sat, 24 Mar 2018 23:38:10 +0100 [thread overview]
Message-ID: <87efk9qeul.fsf@tullinup.koldfront.dk> (raw)
In-Reply-To: <87lgffqzc1.fsf@ericabrahamsen.net>
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"
next prev parent reply other threads:[~2018-03-24 22:38 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
2018-02-26 20:18 ` Eric Abrahamsen
2018-03-24 22:38 ` Adam Sjøgren [this message]
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=87efk9qeul.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).