[Icon Item] Load .ico files using QIcon
Loading it as a `QImage` just uses whatever first frame there is in the image whereas `QIcon` has all the logic needed for interpreting `.ico` files and picking the right pixmap for a given size. BUG: 429927
This commit is contained in:
parent
4d4db0b199
commit
6ac6ff028e
@ -347,7 +347,8 @@ void IconItem::setSource(const QVariant &source)
|
|||||||
|
|
||||||
if (!localFile.isEmpty()) {
|
if (!localFile.isEmpty()) {
|
||||||
if (sourceString.endsWith(QLatin1String(".svg")) ||
|
if (sourceString.endsWith(QLatin1String(".svg")) ||
|
||||||
sourceString.endsWith(QLatin1String(".svgz"))) {
|
sourceString.endsWith(QLatin1String(".svgz")) ||
|
||||||
|
sourceString.endsWith(QLatin1String(".ico"))) {
|
||||||
QIcon icon = QIcon(localFile);
|
QIcon icon = QIcon(localFile);
|
||||||
m_iconItemSource.reset(new QIconSource(icon, this));
|
m_iconItemSource.reset(new QIconSource(icon, this));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user