mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-02 15:45:21 +00:00
fix: wrong use of dci icon
DCI iconengine will automatically switch to correct icon when theme type changes. Application should not do anything after getting the pixmap. Log: fix wrong use of dci icon
This commit is contained in:
parent
af35000028
commit
69cec726c3
@ -44,13 +44,7 @@ void IconManager::setDisplayMode(Dock::DisplayMode displayMode)
|
||||
QPixmap IconManager::pixmap(DGuiApplicationHelper::ColorType colorType) const
|
||||
{
|
||||
// 缺省图标
|
||||
QPixmap pixmap = QIcon::fromTheme("dock-control-panel").pixmap(ITEMSIZE, ITEMSIZE);
|
||||
QColor foreColor = (colorType == DGuiApplicationHelper::ColorType::DarkType ? Qt::white : Qt::black);
|
||||
foreColor.setAlphaF(0.8);
|
||||
QPainter pa(&pixmap);
|
||||
pa.setCompositionMode(QPainter::CompositionMode_SourceIn);
|
||||
pa.fillRect(pixmap.rect(), foreColor);
|
||||
return pixmap;
|
||||
return QIcon::fromTheme("dock-control-panel").pixmap(ITEMSIZE, ITEMSIZE);
|
||||
}
|
||||
|
||||
PluginsItemInterface *IconManager::findPlugin(const QString &pluginName) const
|
||||
|
Loading…
x
Reference in New Issue
Block a user