Caching and showing them from local data-URLs leaded to blurry rendering in Qt.
Signed-off-by: Michael Schuster <michael@schuster.ms>
return _apps[index.row()]->name();
} else if (role == UrlRole) {
return _apps[index.row()]->url();
+ } else if (role == IconUrlRole) {
+ return _apps[index.row()]->iconUrl().toString();
}
return QVariant();
}
QHash<int, QByteArray> roles;
roles[NameRole] = "appName";
roles[UrlRole] = "appUrl";
+ roles[IconUrlRole] = "appIconUrl";
return roles;
}
enum UserAppsRoles {
NameRole = Qt::UserRole + 1,
- UrlRole
+ UrlRole,
+ IconUrlRole
};
void buildAppList();
Menu {\r
id: appsMenu\r
y: (trayWindowAppsButton.y + trayWindowAppsButton.height + 2)\r
- width: (trayWindowAppsButton.width * 2)\r
+ width: (trayWindowAppsButton.width * 3)\r
closePolicy: "CloseOnPressOutside"\r
\r
background: Rectangle {\r
delegate: MenuItem {\r
text: appName\r
font.pixelSize: 12\r
+ icon.source: appIconUrl\r
onTriggered: appsMenuModelBackend.openAppUrl(appUrl)\r
}\r
}\r