-
-
Notifications
You must be signed in to change notification settings - Fork 521
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
Pixellated icon in KDE Large Icons task switcher #302
Comments
Hi Richard! thank you for reporting this. I'll try to reroduce it and find a way of solving it. |
Ok, solved with this snippet under stats.py, init:222:
But maybe it's better to add it as resource of the dialog definition, instead of hardcoding it there. I'll test both options. |
That doesn't fix it for me. Is there more than just that snippet?
The binary in /usr/bin seems to be updated. I am getting a warning during the build:
Not sure if it's relevant. |
nope, only those 2 lines after https://github.com/evilsocket/opensnitch/blob/master/ui/opensnitch/dialogs/stats.py#L210 in tested with kde plasma 5.19.5 , framework 5.74.0 If you have it installed and running, edit By the way, don't you use the AUR package? |
I had the AUR package originally but I removed it because I planned to fix it myself and submit a PR, so I was build and installing the package from a repo clone using make. I'm on plasma 5.20.4, framework 5.76.0. I just installed the opensnitch-git package but there is no opensnitch dir in /usr/lib/python3.8. |
It would be good if you could identify where is located the installation of the GUI, maybe you have several installations at different locations. I don't know about the AUR package, but installing it manually should be under /usr/local/lib/python3 or python3.x (whatever /usr/bin/python3 points to). It could also be located under /usr/lib/pythonX.Y/ Once that solved, try again modifying the stats.py which is being used to show the window, either adding the lines above or :
which should load the default icon from the resources store of size 512px. I'll test it on more systems. |
Aha, problem solved. My sys.path reports: ['', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/richard/.local/lib/python3.8/site-packages', '/usr/lib/python3.8/site-packages'] There is: /usr/lib/python3.8/site-packages/opensnitch/ which it is taking in preference to the one /usr/lib/python3.8. |
Sorry, it should be:
If that works (it should load the 512px icon), I can embed the .svg and use it as the window icon. |
Sorry, this response should have been posted 6 days ago but apparently I forgot to hit send! Aha, problem solved. My sys.path reports: ['', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/richard/.local/lib/python3.8/site-packages', '/usr/lib/python3.8/site-packages'] There is: /usr/lib/python3.8/site-packages/opensnitch/ which it is taking in preference to the one /usr/lib/python3.8. |
ok, good news then. But just for clarification, you have had to add this snippet, haven't you?
|
Yes, I did. It's problem solved on both fronts. Your code snippet fixed the reported issue and the noticing the python sys.path issue allowed me to apply your fix without waiting for it to be included in a proper release. Thanks |
ok, I'll add the change so others can benefit also from it. Thank you! |
Describe the bug
The large icons task switcher in KDE is displaying an upscaled icon for opensnitch.
To Reproduce
Run Manjaro. Select the Large Icons task switcher
Press alt-tab
Expected behavior (optional)
A non-pixelated 512x512 icon to be displayed.
OS (please complete the following information):
Additional context
I thought this might be an easy one to fix, and I could just submit a PR for you, but my Python skills are lacking.
I have tried switching the setup.py script to placing the opensnitch-ui.png file in 512x512 hicolor directory, instead of 48x48. That didn't help.
I read that KWin reads icons from the Window, not the desktop file. Interestingly, xprop reveals the issue:
Compare to Firefox:
The Firefox window has multiple icon resources attached. OpenSnitch only has the 48x48 icon.
However, I'm not sure why this is the case. From what I can see, the window setup code is loading the window icon from ui/opensnitch/res/icon-white.svg. Lacking any knowledge of how Qt handles svg sizing for icons, I tried switching it out for the png version which is sized at 512x512 already. That made no difference. I also tried editing the svg file manually to set the size. This didn't help.
The text was updated successfully, but these errors were encountered: