aseba icon indicating copy to clipboard operation
aseba copied to clipboard

Improve handling of SVG files

Open cor3ntin opened this issue 7 years ago • 5 comments

In quite a few places, we use QSvg to render icons. While this fine, it does introduce a hard dependency on QSvg. It would be possible to use QIcon instead, that would link to QSvg at runtime, removing that dependency

I think it's a better pattern that having modules such as asebaaboutqt be conditionally compiled.

cor3ntin avatar Jan 26 '18 10:01 cor3ntin

There was a reason I used QSvg directly but cannot remember the details, I think something linked to a problem with HiDPI screens or a limitation of QIcon with SVGs. It's fine for me to switch if the underlying problem has been fixed (which I expect to be the case as we switch from Qt 4.x to 5.x).

stephanemagnenat avatar Jan 26 '18 11:01 stephanemagnenat

@stephanemagnenat oh yeah, HiDPI support in 4.x was a mess - almost non existent really. It's better now, i think we would still need to specify a default size in the svg files.

cor3ntin avatar Jan 26 '18 11:01 cor3ntin

i think we would still need to specify a default size in the svg files.

That's annoying as we want to use the file at different resolutions. If this imply to keep using QSvg, I would keep using it.

stephanemagnenat avatar Jan 26 '18 11:01 stephanemagnenat

The default size is only useful if you don't specify it in the application. It does not constrain the way you use the file, merely how viewers render it. If the application request a given size, say 64x64, that's what it will get

cor3ntin avatar Jan 26 '18 11:01 cor3ntin

Ok then it's fine.

stephanemagnenat avatar Jan 26 '18 13:01 stephanemagnenat