smooth animation for show/hide badge infos

pull/1/head
Michail Vourlakos 8 years ago
parent a78b90fb9e
commit 38fda1f688

@ -24,7 +24,6 @@ import org.kde.latte 0.1 as Latte
Item {
id: background
Item {
id: subRectangle
width: parent.width/ 2

@ -107,7 +107,7 @@ Rectangle {
Text {
id: valueText
anchors.centerIn: parent
text: numberValue
text: numberValue > 0 ? numberValue : ""
font.pixelSize: 0.6 * parent.height
font.bold: true
color: mainItemContainer.badgeIndicator > 0 ? theme.backgroundColor : theme.textColor

@ -262,10 +262,16 @@ Item{
Loader{
id: progressLoader
anchors.fill: iconImageBuffer
active: (centralItem.smartLauncherEnabled && centralItem.smartLauncherItem && !mainItemContainer.isSeparator
&& (centralItem.smartLauncherItem.progressVisible || mainItemContainer.badgeIndicator > 0))
active: opacityN > 0
asynchronous: true
property real opacityN: (centralItem.smartLauncherEnabled && centralItem.smartLauncherItem && !mainItemContainer.isSeparator
&& (centralItem.smartLauncherItem.progressVisible || mainItemContainer.badgeIndicator > 0)) ? 1 : 0
Behavior on opacityN {
NumberAnimation { duration: root.durationTime*2*units.longDuration }
}
sourceComponent: Item{
ShaderEffect {
id: iconOverlay
@ -349,6 +355,7 @@ Item{
TaskProgressOverlay{
anchors.fill:parent
opacity: progressLoader.opacityN
}
}
}
@ -370,11 +377,17 @@ Item{
Loader{
id: audioStreamIconLoader
anchors.fill: iconImageBuffer
active: mainItemContainer.hasAudioStream && !mainItemContainer.isSeparator
active: opacityN>0
asynchronous: true
readonly property bool shown: item && item.visible
property real opacityN: mainItemContainer.hasAudioStream && !mainItemContainer.isSeparator ? 1 : 0
Behavior on opacityN {
NumberAnimation { duration: root.durationTime*2*units.longDuration }
}
sourceComponent: Item{
ShaderEffect {
id: iconOverlay2
@ -454,13 +467,13 @@ Item{
}
AudioStream{
id: audioStreamBadge
anchors.fill:parent
opacity: audioStreamIconLoader.opacityN
}
}
}
/// END of Audio Loader
}

Loading…
Cancel
Save