mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
[SiteIcon] Support :pressed state for style sheets
This commit is contained in:
parent
2228b060bc
commit
2e8c9f690e
@ -78,8 +78,12 @@ void SiteIcon::iconClicked()
|
||||
return;
|
||||
}
|
||||
|
||||
setDown(true);
|
||||
|
||||
SiteInfoWidget* info = new SiteInfoWidget(m_window);
|
||||
info->showAt(parentWidget());
|
||||
|
||||
connect(info, SIGNAL(destroyed()), this, SLOT(popupClosed()));
|
||||
}
|
||||
|
||||
void SiteIcon::updateIcon()
|
||||
@ -87,6 +91,11 @@ void SiteIcon::updateIcon()
|
||||
ToolButton::setIcon(m_icon);
|
||||
}
|
||||
|
||||
void SiteIcon::popupClosed()
|
||||
{
|
||||
setDown(false);
|
||||
}
|
||||
|
||||
void SiteIcon::contextMenuEvent(QContextMenuEvent* e)
|
||||
{
|
||||
// Prevent propagating to LocationBar
|
||||
|
@ -42,6 +42,8 @@ private slots:
|
||||
void iconClicked();
|
||||
void updateIcon();
|
||||
|
||||
void popupClosed();
|
||||
|
||||
private:
|
||||
void contextMenuEvent(QContextMenuEvent* e);
|
||||
void mousePressEvent(QMouseEvent* e);
|
||||
|
@ -137,11 +137,6 @@ void ToolButton::mousePressEvent(QMouseEvent* e)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (e->buttons() == Qt::MiddleButton) {
|
||||
setDown(true);
|
||||
}
|
||||
|
||||
QToolButton::mousePressEvent(e);
|
||||
}
|
||||
|
||||
@ -160,7 +155,6 @@ void ToolButton::mouseReleaseEvent(QMouseEvent* e)
|
||||
}
|
||||
|
||||
QToolButton::mouseReleaseEvent(e);
|
||||
setDown(false);
|
||||
}
|
||||
|
||||
void ToolButton::mouseDoubleClickEvent(QMouseEvent* e)
|
||||
|
Loading…
Reference in New Issue
Block a user