mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Add iconScaledPixmap() convenience functions.
This commit is contained in:
@@ -143,6 +143,24 @@ QPixmap Group::iconPixmap() const
|
||||
}
|
||||
}
|
||||
|
||||
QPixmap Group::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(m_db);
|
||||
|
||||
if (m_db) {
|
||||
return m_db->metadata()->customIconScaledPixmap(m_data.customIcon);
|
||||
}
|
||||
else {
|
||||
return QPixmap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int Group::iconNumber() const
|
||||
{
|
||||
return m_data.iconNumber;
|
||||
|
||||
Reference in New Issue
Block a user