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
Invert Framing for Torrent Status Icons #7583
Conversation
Also recolor the icons to match the text-color used for the torrent-status as well. Optimized using SVGOMG [<https://jakearchibald.github.io/svgomg/>].
|
@LordNyriox are you willing to install node.js? If yes, then install svgo and svgexport.
svgexport
width:height expressed in pixels |
@LordNyriox I pushed 2 commits to your branch(apparently github allows this for PRs). About the recoloring, I have mixed feelings. |
@sledgehammer999: could you disable short names in svgo, as well as omitting black colors, please? That would simplify code for colours conversion for colour themes PR. |
Do you know which switches control that? |
No, sorry. I have never used the converter. Just found those possibilities in https://github.com/svg/svgo/blob/master/plugins/convertColors.js |
Can you tell how are you going to "color convert" from code (Qt) so I can understand what is going on? |
Can you link to the specific commit/file/line that does this? |
I just pushed 2 temporary commits. They have the padding removed. In my opinion, it looks better in the GUI. |
Sorry for the late reply. I need to replace colour in SVG file and save it back to disk, because QIcon, initialised with a SVG file, does lazy loading. I've tried to use QSvgRenderer + QSvgGenerator, supplying a custom engine, but this pair incorrectly handles transform matrices, so I ended up with simple regexps: fcf7231#diff-ef0fd4c980145c689f4b98c55277888dR78 |
Ok I understand. Then I'll manually place back the If noone objects I'll use the svgs with removed padding. (in a couple days) |
I think it doesn't matter what comes after "fill=". The regexp seem to capture the value anyway. |
Thank you.
No, I didn't. I want to keep icons in svg format.
And even if it does not, it is easy to change the regexp. |
Apparently you didn't read the SO comment. It implements a custom QIconEngine, which internally just uses QSvgRenderer to output the pixmap or do the paint. It is a hack to support loading an svg from a buffer.
Are you sure that it is harmless to remove them? svgo didn't remove them automatically. |
@sledgehammer999: All the SVGs affected by this PR now have their In addition, I manually added a |
@LordNyriox I fixup yours and my commits into one. I hope you don't mind. (I kept the 1st ones from you). If noone objects, I am going to merge this tomorrow. |
Thx for this. |
Also recolor the icons to match the text-color used for the torrent-status, as well.
Icons optimized using SVGOMG [https://jakearchibald.github.io/svgomg/].
Ping @evsh, @Chocobo1, @sledgehammer999.