mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-26 11:56:46 -08:00
Add iconScaledPixmap() convenience functions.
This commit is contained in:
1 parent
1f33e6f044
commit
38245aa2a9
4 files changed
+33
No files matched your search
@@ -123,6 +123,19 @@ QPixmap Entry::iconPixmap() const
|
||||
}
|
||||
}
|
||||
|
||||
QPixmap Entry::iconScaledPixmap() const
|
||||
{
|
||||
if (m_data.customIcon.isNull()) {
|
||||
// built-in icons are 16x16 so don't need to be scaled
|
||||
return databaseIcons()->iconPixmap(m_data.iconNumber);
|
||||
}
|
||||
else {
|
||||
Q_ASSERT(database());
|
||||
|
||||
return database()->metadata()->customIconScaledPixmap(m_data.customIcon);
|
||||
}
|
||||
}
|
||||
|
||||
int Entry::iconNumber() const
|
||||
{
|
||||
return m_data.iconNumber;
|
||||
|
||||
Reference in new issue
Block a user