1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-09 16:58:16 +03:00

fix pixelated icons when par.effect disabled

This commit is contained in:
Michail Vourlakos 2019-04-24 00:44:23 +03:00
parent 99454c0b15
commit 8168d4ec13
2 changed files with 11 additions and 3 deletions

View File

@ -369,7 +369,9 @@ QSGNode *IconItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *update
delete oldNode;
textureNode = new ManagedTextureNode;
textureNode->setTexture(QSharedPointer<QSGTexture>(window()->createTextureFromImage(m_iconPixmap.toImage())));
textureNode->setTexture(QSharedPointer<QSGTexture>(window()->createTextureFromImage(m_iconPixmap.toImage(), QQuickWindow::TextureCanUseAtlas)));
textureNode->setFiltering(smooth() ? QSGTexture::Linear : QSGTexture::Nearest);
m_sizeChanged = true;
m_textureChanged = false;
}

View File

@ -150,14 +150,20 @@ Item{
anchors.centerIn: parent
width: Math.round(newTempSize) //+ 2*taskIcon.shadowSize
//! WORKAROUND: When the parabolic effect is disabled zoom=1.0 and no
//! Shadows are enabled for Items then many task icons look pixelated.
//! I dont know how multiplying the width *1.002 helps the situation
//! but it does. After adding any multipier e.g. *1.002 the pixelated
//! icons are gone
width: Math.round(newTempSize)*1.002
height: Math.round(width)
source: decoration
smooth: root.zoomFactor === 1 ? true : false
providesColors: indicators.info.needsIconColors
opacity: root.enableShadows ? 0 : 1
visible: !taskItem.isSeparator && !badgesLoader.active
//visible: !root.enableShadows
onValidChanged: {
if (!valid && (source === decoration || source === "unknown")) {