Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Manually scale the icon if it was passed as a pixbuf #95
Conversation
|
This is for HiDPI, right? Do you know an app where this is a problem so I can reproduce it? |
|
Telegram? |
|
And yes it's for HiDPI :D |
|
Can you post a before/after screenshot of the problem this PR is trying to solve? I don't have a HiDPI screen and tried to emulate it by setting the window scale factor to 2, but GNOME Shell didn't scale correctly. |
|
Thanks :) Your changes look good. Can you test though, if also adding the scale factor here let qualifiedIconPixmapArray = sortedIconPixmapArray.filter(function(pixmap) {
// we disqualify any pixmap that is bigger than our requested size
return pixmap[0] <= iconSize * scale_factor &&
pixmap[1] <= iconSize * scale_factor
})improves the image quality? We wouldn't want to disqualify HiDPI pixbufs. edit: To clarify: Set if (height != 0) {
scale_factor = iconSize / height
}afterwards (btw: always use braces). Also: Don't we want to return in case of |
|
iconSize is already scaled there. I think there is no need to scale it
again.
On 3 Oct 2017 15:30, "Jan Niklas Hasse" <notifications@github.com> wrote:
Thanks :)
Your changes look good. Can you test though, if also adding the scale
factor here
let qualifiedIconPixmapArray = sortedIconPixmapArray.filter(function(pixmap) {
// we disqualify any pixmap that is bigger than our
requested size
return pixmap[0] <= iconSize * scale_factor &&
pixmap[1] <= iconSize * scale_factor
})
improves the image quality? We wouldn't want to disqualify HiDPI pixbufs.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#95 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADgbsTOMYh-sL-cun1W5CJe0itMOdqBoks5sootkgaJpZM4PmCvK>
.
|
|
Ups, yeah you're right. Thank you very much for the PR :) |


azzar1 commentedSep 27, 2017
•
Edited 1 time
-
azzar1
Sep 27, 2017
Manually scale the icon if it was passed as a pixbuf.