mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix(dock):delete all plugin highlight
This commit is contained in:
parent
2803ddcca7
commit
f0fec8995a
@ -112,43 +112,6 @@ QSize PluginsItem::sizeHint() const
|
||||
return m_centralWidget->sizeHint();
|
||||
}
|
||||
|
||||
void PluginsItem::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
|
||||
if (m_draging)
|
||||
return;
|
||||
|
||||
DisplayMode displayMode = m_pluginInter->displayMode();
|
||||
|
||||
if (displayMode == Dock::DisplayMode::Fashion) {
|
||||
return;
|
||||
}
|
||||
if (!m_hover || m_dragging) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (itemType() == TrayPlugin)
|
||||
return;
|
||||
|
||||
// draw hover background
|
||||
QRect destRect;
|
||||
destRect.setSize(m_centralWidget->sizeHint());
|
||||
destRect.moveCenter(rect().center());
|
||||
|
||||
QPainterPath path;
|
||||
path.addRoundedRect(destRect, 6, 6);
|
||||
|
||||
QColor color;
|
||||
color = QColor::fromRgb(255, 255, 255);
|
||||
|
||||
QPainter painter(this);
|
||||
painter.setRenderHint(QPainter::Antialiasing, true);
|
||||
painter.setOpacity(0.1);
|
||||
|
||||
painter.fillPath(path, color);
|
||||
}
|
||||
|
||||
void PluginsItem::refershIcon()
|
||||
{
|
||||
m_pluginInter->refreshIcon(m_itemKey);
|
||||
|
@ -47,7 +47,6 @@ public:
|
||||
|
||||
ItemType itemType() const override;
|
||||
QSize sizeHint() const override;
|
||||
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
|
||||
|
||||
QWidget *centralWidget() const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user