backport IconAction visibility fix
svn path=/branches/KDE/4.4/kdelibs/; revision=1072709
This commit is contained in:
parent
a06f77b764
commit
c337423b66
@ -225,6 +225,10 @@ void IconAction::rebuildPixmap()
|
||||
|
||||
bool IconAction::event(QEvent::Type type, const QPointF &pos)
|
||||
{
|
||||
if (!m_action->isVisible() || !m_action->isEnabled()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_icon->size().width() < m_rect.width() * 2.0 ||
|
||||
m_icon->size().height() < m_rect.height() * 2.0) {
|
||||
return false;
|
||||
@ -289,6 +293,10 @@ QAction *IconAction::action() const
|
||||
|
||||
void IconAction::paint(QPainter *painter) const
|
||||
{
|
||||
if (!m_action->isVisible() || !m_action->isEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_icon->size().width() < m_rect.width() * 2.0 ||
|
||||
m_icon->size().height() < m_rect.height() * 2.0) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user