mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 20:40:29 +08:00
refs #661, added a label/icon to context order menu as proposed in the meeting
This commit is contained in:
@@ -69,6 +69,12 @@ namespace BlackGui
|
||||
return this->m_path.isEmpty() || this->m_path == pathNone();
|
||||
}
|
||||
|
||||
QPixmap CMenuAction::getPixmap() const
|
||||
{
|
||||
if (this->m_icon.isNull()) { return QPixmap(); }
|
||||
return this->m_icon.pixmap(this->m_icon.actualSize(QSize(16, 16)));
|
||||
}
|
||||
|
||||
QString CMenuAction::getLastPathPart() const
|
||||
{
|
||||
if (this->m_path.contains('/'))
|
||||
|
||||
@@ -93,6 +93,9 @@ namespace BlackGui
|
||||
//! Icon
|
||||
const QIcon &getIcon() const { return m_icon; }
|
||||
|
||||
//! Icon as pixmap
|
||||
QPixmap getPixmap() const;
|
||||
|
||||
//! Has icon?
|
||||
bool hasIcon() const { return !m_icon.isNull(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user