-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fm::IconInfo
, scale factor and symbolic icons: not a bug but details
#788
Comments
It could interfere with the active icon engine. Fixes #788
Also, see @palinek's comment on why we need an icon engine: #789 (comment) |
Can you, please, exactly describe icon names, themes etc. for me to replicate it. Maybe we can find a solution/workaround. |
Any icon set with SVG symbolic icons, like Breeze. |
What does "symbolic" mean here? |
They have simple forms and are usually monochrome. For coders, I should have said, "with stylesheets". |
It is using what is provided by the icon theme. E.g. the desktop folder -> icon
So the theme icon engine just follows the decision made by icon theme. (with the scale factor > 1 there is never requested icon smaller than 32) |
No! Breeze also has |
Oh sorry... missed that. I have something in my mind, need to test if it can solve this problem. |
Please, what icon theme are you using |
It makes no difference; the "problem" appears with all icon themes that have symbolic icons. I use https://github.com/tsujan/Plataro but, IMO, Breeze is better for testing This is a screenshot of LXQt file dialog with a scale factor of 2 and Breeze: Like in my other screenshot, no view/side-pane icon is symbolic, but all would be symbolic if |
|
Ok... here is some debug output (with the lxqt/libqtxdg#275, but it probably doesn't make difference) how the icon is searched (user-desktop):
So for this example, how/why should we determine the 16@3x better match than the 48 ? |
I feel we may be talking of different things, but |
This screenshot is taken with the Breeze set and a scale factor of 3 and, again, shows that LXQt icon engine has no problem: The toolbar icons are 16-pix (in Kvantum), their pixmaps have a device pixel ration of 3, and all of them are symbolic (except for the rightmost one, which doesn't have a symbolic icon at all). |
Can you have a look in #792? |
I did. Please also read my comment about the Breeze set there. Problem inside problem... |
Let's summarize it again, for the sake of removing confusions (if you don't agree with what follows, please tell me):
|
I found no reason for using `IconEngine`. Moreover, its removal closes #788
Scaling is taken into account separately for Qt < 6.8 and Qt ≥ 6.8. Closes #788
Problem solved, at last: #1015. It was caused by a bad scaled pixmap. But it couldn't be fixed with Qt5, because a needed |
Fm::IconInfo
correctly scales icons with scale factors > 1; actually, it lets Qt do it. It's responsible for icons inside pcmanfm-qt's (as well as LXQt file dialog's) view and side-pane. Other icons are controlled by Qt, whether directly or through an icon engine (like that of LXQt).But, for example, with a scale factor of 2, LXQt's icon engine will choose symbolic icons for the sizes 16×2, 22×2 and 24×2 if the icon theme supports them, while
Fm::IconInfo
shows ordinary icons. The end result is sharp icons in both cases butFm::IconInfo
doesn't use symbolic icons with a scale factors of 2.You could check that by launching
QT_SCALE_FACTOR=2 pcmanfm-qt
(after stoppingpcmanfm-qt
from LXQt session settings). If your icon theme supports symbolic icons, the toolbar icons will be symbolic but the side-pane and view icons won't.Since
Fm::IconInfo
takes the icon name fromGIcon
and usesQIconEngine
to find the icon, there doesn't seem to be a place in it for dealing with scale factors directly. So, I'm not sure this could be changed in future. However, IMO, it's better to have an open issue for it.EDIT: See #788 (comment) → 4, for why you might get confused by the Breeze icon set when testing this.
The text was updated successfully, but these errors were encountered: