-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix blurry favicons on hidpi displays #3129
Conversation
Thank you! It'll probably take me a bit until I get to properly reviewing this, as I was really busy with v1.0 and the attention it has received over the past few days. FWIW the docs say:
The only place qutebrowser uses icon = opt.icon.pixmap(opt.iconSize, icon_mode, icon_state)
p.drawPixmap(layouts.icon.x(), layouts.icon.y(), icon) so this should be fine. @jgkamat since you looked at tab sizing stuff recently, want to take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a look at the logic, and I don't think this will break anything. I don't have a HiDPI monitor, so I can't test this too deeply though. It does work for me as expected on my computers.
Could you do me a favor and make sure pinned tab's widths aren't cut off or too long with this patch? I don't suspect it will make a difference though.
Pinning tabs seems the same on this iMac. Regardless of pinning, depending on the website, this change can invoke a different favicon. |
For example, I get the "For Apple devices" icon with this patch,
source: https://diasp.org |
I can't reproduce this (Linux, Qt 5.9, both QtWebKit and QtWebEngine) - I get the normal (red star on black circle) icon both with and without the patch. |
I get the white star on black background "for Apple devices" icon (Linux, Qt 5.9, QtWebEngine, 4K High DPI display). I suspect it's actually selecting the "Nokia devices" icon, as that's the same PNG, but with the |
Hmm, seeing that this seems to display favicons which aren't really suitable for qutebrowser's small default favicon size, I feel like this should be an option. @foliea is this something you'd like to work on? Let me know if you need help. |
In what sense? They are scaled to be the same size in qutebrowser. |
I don't follow - from what it sounds, qutebrowser show the icon intended for high resolutions as something like a 10x10px icon, right? |
yes - what I'm saying is that e.g. https://diasp.org/ has two favicons - a small one: If I'm understanding what you said above correctly, you get the bigger one, but scaled down to 10x10 or so? If that's happening with this patch, I think it should be using a setting. |
Ah, that seems fine to me then - thanks everyone for the PR, reviews and tests! |
This fixes blurry favicons on hidpi displays.
Related to #1585
Results on non hidpi display:
Results on hidpi display:
This change is