mirror of
https://github.com/tnodir/fort
synced 2024-11-15 05:36:09 +00:00
UI: Special icon for "System" app.
This commit is contained in:
parent
ea11d78341
commit
62bae6843d
@ -32,6 +32,7 @@
|
||||
<file>images/sheild-96.png</file>
|
||||
<file>images/textfield_rename.png</file>
|
||||
<file>images/tick.png</file>
|
||||
<file>images/windows-48.png</file>
|
||||
<file>images/world.png</file>
|
||||
<file>images/world_link.png</file>
|
||||
</qresource>
|
||||
|
BIN
src/ui/images/windows-48.png
Normal file
BIN
src/ui/images/windows-48.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
@ -121,15 +121,29 @@ bool extractVersionInfo(const QString &appPath, AppInfo &appInfo)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool isSystemApp(const QString &appPath)
|
||||
{
|
||||
return appPath.compare("System", Qt::CaseInsensitive) == 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool AppUtil::getInfo(const QString &appPath, AppInfo &appInfo)
|
||||
{
|
||||
if (isSystemApp(appPath)) {
|
||||
appInfo.fileDescription = appPath;
|
||||
return true;
|
||||
}
|
||||
|
||||
return extractVersionInfo(appPath, appInfo);
|
||||
}
|
||||
|
||||
QImage AppUtil::getIcon(const QString &appPath)
|
||||
{
|
||||
if (isSystemApp(appPath)) {
|
||||
return QImage(":/images/windows-48.png");
|
||||
}
|
||||
|
||||
return extractShellIcon(appPath)
|
||||
.toImage();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user