Code review comment for lp:~larsu/ubuntu-ui-toolkit/add-unity-theme-icon-provider

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

Actually a more robust solution:
I've proposed these changes to qmenumodel where this provider currently resides.

    if (!icon.isNull()) {
        if (requestedSize.isValid()) {
            return themedIcon.pixmap(requestedSize);
        } else {
            QList<QSize> sizes = icon.availableSizes();
            if (sizes.count() > 0 && sizes.last().isValid()) {
                return icon.pixmap(sizes.last());
            } else {
                return icon.pixmap(QSize(32,32));
            }
        }
    }
    return QPixmap();

« Back to merge proposal