mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-25 19:21:41 +03:00
do not cache tasks animations
--at the same time the maximum parabolic zoom factor is always calculated based on the fact to provide maximum icon size that is an integer value
This commit is contained in:
parent
ddaf790755
commit
bb998ea90c
@ -28,7 +28,14 @@ import "./privates" as Ability
|
||||
|
||||
Ability.ParabolicEffectPrivate {
|
||||
isEnabled: factor.zoom>1 && !root.inConfigureAppletsMode
|
||||
factor.zoom: LatteCore.WindowSystem.compositingActive && animations.active ? ( 1 + (plasmoid.configuration.zoomLevel / 20) ) : 1
|
||||
factor.zoom: {
|
||||
var storedZoom = LatteCore.WindowSystem.compositingActive && animations.active ? ( 1 + (plasmoid.configuration.zoomLevel / 20) ) : 1;
|
||||
var maxSize = storedZoom * metrics.iconSize;
|
||||
maxSize = Math.round(maxSize);
|
||||
|
||||
//! this way we make sure that the iconSize at the maximum of its parabolic effect is an integer
|
||||
return (maxSize/metrics.iconSize);
|
||||
}
|
||||
factor.maxZoom: Math.max(factor.zoom, animations.requirements.zoomFactor)
|
||||
restoreZoomIsBlocked: restoreZoomIsBlockedFromApplet || (view && view.contextMenuIsShown)
|
||||
|
||||
|
@ -351,10 +351,7 @@ Item {
|
||||
//! moved out of badgeVisualsLoader in order to avoid crashes
|
||||
//! when the latte view is removed
|
||||
Loader {
|
||||
width: taskIconContainer.width
|
||||
height: taskIconContainer.height
|
||||
anchors.centerIn: taskIconContainer
|
||||
|
||||
anchors.fill: parent
|
||||
active: badgeVisualsLoader.active && graphicsSystem.isAccelerated
|
||||
sourceComponent: Colorize{
|
||||
source: badgeVisualsLoader.item
|
||||
@ -363,7 +360,8 @@ Item {
|
||||
//! WORKAROUND: When Effects are enabled e.g. BrightnessContrast, Colorize etc.
|
||||
//! the icon appears pixelated. It is even most notable when parabolic.factor.zoom === 1
|
||||
//! I don't know enabling cached=true helps, but it does.
|
||||
cached: true
|
||||
//! In Question?
|
||||
//cached: true
|
||||
|
||||
opacity: stateColorizer.opacity
|
||||
hue: stateColorizer.hue
|
||||
@ -376,15 +374,14 @@ Item {
|
||||
//! Effects
|
||||
Colorize{
|
||||
id: stateColorizer
|
||||
anchors.centerIn: taskIconContainer
|
||||
width: taskIconContainer.width
|
||||
height: taskIconContainer.height
|
||||
anchors.fill: parent
|
||||
|
||||
//! HACK TO AVOID PIXELIZATION
|
||||
//! WORKAROUND: When Effects are enabled e.g. BrightnessContrast, Colorize etc.
|
||||
//! the icon appears pixelated. It is even most notable when parabolic.factor.zoom === 1
|
||||
//! I don't know why enabling cached=true helps, but it does.
|
||||
cached: true
|
||||
//! In Question?
|
||||
//cached: true
|
||||
|
||||
source: badgesLoader.active ? badgesLoader : taskIconItem
|
||||
|
||||
@ -397,15 +394,14 @@ Item {
|
||||
|
||||
BrightnessContrast{
|
||||
id:hoveredImage
|
||||
anchors.centerIn: taskIconContainer
|
||||
width: taskIconContainer.width
|
||||
height: taskIconContainer.height
|
||||
anchors.fill: parent
|
||||
|
||||
//! HACK TO AVOID PIXELIZATION
|
||||
//! WORKAROUND: When Effects are enabled e.g. BrightnessContrast, Colorize etc.
|
||||
//! the icon appears pixelated. It is even most notable when parabolic.factor.zoom === 1
|
||||
//! I don't know enabling cached=true helps, but it does.
|
||||
cached: true
|
||||
//! In Question?
|
||||
//cached: true
|
||||
|
||||
source: badgesLoader.active ? badgesLoader : taskIconItem
|
||||
|
||||
@ -420,15 +416,14 @@ Item {
|
||||
|
||||
BrightnessContrast {
|
||||
id: brightnessTaskEffect
|
||||
anchors.centerIn: taskIconContainer
|
||||
width: taskIconContainer.width
|
||||
height: taskIconContainer.height
|
||||
anchors.fill: parent
|
||||
|
||||
//! HACK TO AVOID PIXELIZATION
|
||||
//! WORKAROUND: When Effects are enabled e.g. BrightnessContrast, Colorize etc.
|
||||
//! the icon appears pixelated. It is even most notable when parabolic.factor.zoom === 1
|
||||
//! I don't know enabling cached=true helps, but it does.
|
||||
cached: true
|
||||
//! In Question?
|
||||
//cached: true
|
||||
|
||||
source: badgesLoader.active ? badgesLoader : taskIconItem
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user