fix(dock):delete all plugin highlight

This commit is contained in:
chenzhe 2019-12-21 14:50:24 +08:00
parent 2803ddcca7
commit f0fec8995a
2 changed files with 0 additions and 38 deletions

View File

@ -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);

View File

@ -47,7 +47,6 @@ public:
ItemType itemType() const override;
QSize sizeHint() const override;
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
QWidget *centralWidget() const;