mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-30 08:13:25 -05:00
Fix compile errors when building snap package
* System icons are no longer used eliminating the need to differentiate behavior for the snap package on Linux.
This commit is contained in:
parent
557736ea5e
commit
e26063a872
@ -85,12 +85,6 @@ namespace Bootstrap
|
|||||||
bootstrap();
|
bootstrap();
|
||||||
MessageBox::initializeButtonDefs();
|
MessageBox::initializeButtonDefs();
|
||||||
|
|
||||||
#ifdef KEEPASSXC_DIST_SNAP
|
|
||||||
// snap: force fallback theme to avoid using system theme (gtk integration)
|
|
||||||
// with missing actions just like on Windows and macOS
|
|
||||||
QIcon::setThemeSearchPaths(QStringList() << ":/icons");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
// Don't show menu icons on OSX
|
// Don't show menu icons on OSX
|
||||||
QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
|
QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
|
||||||
|
@ -97,42 +97,22 @@ QString FilePath::wordlistPath(const QString& name)
|
|||||||
|
|
||||||
QIcon FilePath::applicationIcon()
|
QIcon FilePath::applicationIcon()
|
||||||
{
|
{
|
||||||
#ifdef KEEPASSXC_DIST_SNAP
|
|
||||||
return icon("apps", "keepassxc", false);
|
return icon("apps", "keepassxc", false);
|
||||||
#else
|
|
||||||
return icon("apps", "keepassxc", false);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QIcon FilePath::trayIcon()
|
QIcon FilePath::trayIcon()
|
||||||
{
|
{
|
||||||
bool darkIcon = useDarkIcon();
|
return useDarkIcon() ? icon("apps", "keepassxc-dark", false) : icon("apps", "keepassxc", false);
|
||||||
|
|
||||||
#ifdef KEEPASSXC_DIST_SNAP
|
|
||||||
return (darkIcon) ? icon("apps", "keepassxc-dark", false) : icon("apps", "keepassxc", false);
|
|
||||||
#else
|
|
||||||
return (darkIcon) ? icon("apps", "keepassxc-dark", false) : icon("apps", "keepassxc", false);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QIcon FilePath::trayIconLocked()
|
QIcon FilePath::trayIconLocked()
|
||||||
{
|
{
|
||||||
#ifdef KEEPASSXC_DIST_SNAP
|
|
||||||
return icon("apps", "keepassxc-locked", false);
|
return icon("apps", "keepassxc-locked", false);
|
||||||
#else
|
|
||||||
return icon("apps", "keepassxc-locked", false);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QIcon FilePath::trayIconUnlocked()
|
QIcon FilePath::trayIconUnlocked()
|
||||||
{
|
{
|
||||||
bool darkIcon = useDarkIcon();
|
return useDarkIcon() ? icon("apps", "keepassxc-dark", false) : icon("apps", "keepassxc-unlocked", false);
|
||||||
|
|
||||||
#ifdef KEEPASSXC_DIST_SNAP
|
|
||||||
return darkIcon ? icon("apps", "keepassxc-dark", false) : icon("apps", "keepassxc-unlocked", false);
|
|
||||||
#else
|
|
||||||
return darkIcon ? icon("apps", "keepassxc-dark", false) : icon("apps", "keepassxc-unlocked", false);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QIcon FilePath::icon(const QString& category, const QString& name, bool recolor)
|
QIcon FilePath::icon(const QString& category, const QString& name, bool recolor)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user