Runtime decision for QSvgRenderer workarounds

Jakob Petsovits jpetso at gmx.at
Tue May 27 14:49:10 BST 2008


Hi list,

as you may or may not know, QSvgRenderer has not yet been considered accurate 
enough for rendering Oxygen icons on the fly. That has two noticable effects:

- Oxygen ships each icon at each size, or nearly so.
  Little we can do against that at the moment, though.

- KIconLoader and KIconTheme #undef KDE_QT_SVG_RENDERER_FIXED.
  This mainly means SVGs are not used at all unless no PNG icon exists at all.

The latter effect is kinda uncomfortable, as many SVG themes ship with PNGs 
for small sizes, and when an application demands a 128x128 version of that 
icon then the most appropriate PNG (say, 22x22) is scaled up to that size.
Or it's not scaled at all and ridiculously small in comparison to other icons 
(imagine a list of files in Dolphin).

Anyways, #undef KDE_QT_SVG_RENDERER_FIXED at the current state basically 
cripples all themes that make use of SVG. Which is quite a large number these 
days. (Will, your turn: could you please post the Novell bug here?)

So I've come up with an alternative approach: let the theme specify if it 
wants this workaround, including all disadvantages that come with it.
At runtime, with a property in the index.theme desktop file.

Or less abstract:
We'll put "X-KDE-Needs-Renderer-Fix=true" into oxygen/index.theme and let 
Oxygen use its PNGs until the artists are satisfied with QSvgRenderer, while 
Tango, Lila or whatever SVG themes don't need to fear destruction of their 
themes for the one or the other minor glitch.

Deal or no deal? Wishes,
  Jakob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iconloader-runtime-qsvgrenderer-workaround.diff
Type: text/x-diff
Size: 6729 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080527/7bd27336/attachment.diff>


More information about the kde-core-devel mailing list