mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-17 21:04:19 -05:00
Add DataPath::icon() parameter to only use local icons.
This commit is contained in:
parent
fb499154bd
commit
de95b6c347
@ -32,9 +32,13 @@ QIcon DataPath::applicationIcon()
|
|||||||
return icon("apps", "keepassx");
|
return icon("apps", "keepassx");
|
||||||
}
|
}
|
||||||
|
|
||||||
QIcon DataPath::icon(const QString& category, const QString& name)
|
QIcon DataPath::icon(const QString& category, const QString& name, bool fromTheme)
|
||||||
{
|
{
|
||||||
QIcon icon = QIcon::fromTheme(name);
|
QIcon icon;
|
||||||
|
|
||||||
|
if (fromTheme) {
|
||||||
|
icon = QIcon::fromTheme(name);
|
||||||
|
}
|
||||||
|
|
||||||
if (icon.isNull()) {
|
if (icon.isNull()) {
|
||||||
QStringList pngSizes;
|
QStringList pngSizes;
|
||||||
|
@ -26,7 +26,7 @@ class DataPath
|
|||||||
public:
|
public:
|
||||||
QString path(const QString& name);
|
QString path(const QString& name);
|
||||||
QIcon applicationIcon();
|
QIcon applicationIcon();
|
||||||
QIcon icon(const QString& category, const QString& name);
|
QIcon icon(const QString& category, const QString& name, bool fromTheme = true);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DataPath();
|
DataPath();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user