mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix tip not shown when app is inactive
Change-Id: Ifc31d319d996251525fbb9cd19d7713b0859488f
This commit is contained in:
parent
a916bf5af9
commit
021a618e13
@ -79,6 +79,10 @@ public:
|
|||||||
inline QString menu() const
|
inline QString menu() const
|
||||||
{ return qvariant_cast< QString >(property("Menu")); }
|
{ return qvariant_cast< QString >(property("Menu")); }
|
||||||
|
|
||||||
|
Q_PROPERTY(QString Name READ name NOTIFY NameChanged)
|
||||||
|
inline QString name() const
|
||||||
|
{ return qvariant_cast< QString >(property("Name")); }
|
||||||
|
|
||||||
Q_PROPERTY(quint32 CurrentWindow READ currentWindow NOTIFY CurrentWindowChanged)
|
Q_PROPERTY(quint32 CurrentWindow READ currentWindow NOTIFY CurrentWindowChanged)
|
||||||
inline quint32 currentWindow() const
|
inline quint32 currentWindow() const
|
||||||
{ return qvariant_cast< quint32 >(property("CurrentWindow")); }
|
{ return qvariant_cast< quint32 >(property("CurrentWindow")); }
|
||||||
@ -122,6 +126,7 @@ void IdChanged();
|
|||||||
void TitleChanged();
|
void TitleChanged();
|
||||||
void IconChanged();
|
void IconChanged();
|
||||||
void MenuChanged();
|
void MenuChanged();
|
||||||
|
void NameChanged();
|
||||||
void CurrentWindowChanged();
|
void CurrentWindowChanged();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -288,14 +288,17 @@ const QString AppItem::contextMenu() const
|
|||||||
|
|
||||||
QWidget *AppItem::popupTips()
|
QWidget *AppItem::popupTips()
|
||||||
{
|
{
|
||||||
if (m_titles.isEmpty())
|
|
||||||
return nullptr;
|
|
||||||
if (m_draging)
|
if (m_draging)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
const quint32 currentWindow = m_itemEntry->currentWindow();
|
if (!m_titles.isEmpty())
|
||||||
Q_ASSERT(m_titles.contains(currentWindow));
|
{
|
||||||
m_appNameTips->setText(m_titles[currentWindow]);
|
const quint32 currentWindow = m_itemEntry->currentWindow();
|
||||||
|
Q_ASSERT(m_titles.contains(currentWindow));
|
||||||
|
m_appNameTips->setText(m_titles[currentWindow]);
|
||||||
|
} else {
|
||||||
|
m_appNameTips->setText(m_itemEntry->name());
|
||||||
|
}
|
||||||
|
|
||||||
return m_appNameTips;
|
return m_appNameTips;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user