Summary: | Icon loader (QIcon::fromTheme et all) no longer tries to use nearest available size when asked for size not installed on the system | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kiconthemes | Reporter: | Bhushan Shah <bhush94> |
Component: | general | Assignee: | Christoph Feck <cfeck> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arojas, asturm, faure, hein, kensington |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kiconthemes/aa0035d0a69e84c053f6b4504e479fc14ef1cdd2 | Version Fixed In: |
Description
Bhushan Shah
2014-02-06 10:50:38 UTC
*** Bug 334332 has been marked as a duplicate of this bug. *** I'm running into the same problem in Application Menu (aka Kicker): I have a QML delegate using QIconItem backed by a model supplying QIcons created via QIcon::fromTheme(<icon name>). The delegate uses 16x16 icons on a standard DPI system. If an app doesn't have a 16x16 icon installed, QIconItem winds up showing the "unknown" placeholder. In KDE 4, it would scale down from the available 24x24 icon instead. See bug 334332 for more. Should be reported to Qt with a testcase... Quoting the QIcon documentation: "The default engine scales pixmaps down if required, [...]" So this is a bug, AFAICS, not a missing feature. Git commit aa0035d0a69e84c053f6b4504e479fc14ef1cdd2 by Martin Klapetek. Committed on 30/05/2014 at 10:55. Pushed by mklapetek into branch 'master'. Fix looking up icons What the current code does is looking for the best match, storing it into QString path...and then overwrite it with empty string on next run if the icon is not found in the current dir. So we need to check first if the icon is available in the theme and only then store the path, otherwise empty string gets returned non-deterministically. This also fixes case of some missing icons in Plasma Next. REVIEW: 118415 M +6 -2 src/kicontheme.cpp http://commits.kde.org/kiconthemes/aa0035d0a69e84c053f6b4504e479fc14ef1cdd2 |