mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-25 17:16:33 -05:00
Upstream Flathub patches (#7728)
This commit is contained in:
parent
31db3c325d
commit
7cd824ae1c
13 changed files with 169 additions and 20 deletions
|
|
@ -52,9 +52,18 @@ Icons::Icons()
|
|||
{
|
||||
}
|
||||
|
||||
QString Icons::applicationIconName()
|
||||
{
|
||||
#ifdef KEEPASSXC_DIST_FLATPAK
|
||||
return QString("org.keepassxc.KeePassXC");
|
||||
#else
|
||||
return QString("keepassxc");
|
||||
#endif
|
||||
}
|
||||
|
||||
QIcon Icons::applicationIcon()
|
||||
{
|
||||
return icon("keepassxc", false);
|
||||
return icon(applicationIconName(), false);
|
||||
}
|
||||
|
||||
QString Icons::trayIconAppearance() const
|
||||
|
|
@ -81,7 +90,7 @@ QIcon Icons::trayIcon(QString style)
|
|||
|
||||
auto iconApperance = trayIconAppearance();
|
||||
if (!iconApperance.startsWith("monochrome")) {
|
||||
return icon(QString("keepassxc%1").arg(style), false);
|
||||
return icon(QString("%1%2").arg(applicationIconName(), style), false);
|
||||
}
|
||||
|
||||
QIcon i;
|
||||
|
|
@ -92,7 +101,7 @@ QIcon Icons::trayIcon(QString style)
|
|||
i = icon(QString("keepassxc-monochrome-dark%1").arg(style), false);
|
||||
}
|
||||
#else
|
||||
i = icon(QString("keepassxc-%1%2").arg(iconApperance, style), false);
|
||||
i = icon(QString("%1-%2%3").arg(applicationIconName(), iconApperance, style), false);
|
||||
#endif
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
|
||||
// Set as mask to allow the operating system to recolour the tray icon. This may look weird
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue