RibbonMessageGroup: Animation improved and blank view bug fixed.
This commit is contained in:
parent
2a51e9e5f9
commit
1a48510a1b
|
@ -21,7 +21,7 @@ RibbonBlur {
|
||||||
|
|
||||||
Behavior on implicitHeight {
|
Behavior on implicitHeight {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: control.animationTime / 2
|
duration: control.animationTime
|
||||||
easing.type: Easing.OutSine
|
easing.type: Easing.OutSine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,13 +31,13 @@ RibbonBlur {
|
||||||
onCountChanged: {
|
onCountChanged: {
|
||||||
message_list.currentIndex = count ? count - 1 : 0
|
message_list.currentIndex = count ? count - 1 : 0
|
||||||
if(count === 0)
|
if(count === 0)
|
||||||
folded_btn.checked = true
|
clearMessages()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer{
|
Timer{
|
||||||
id: auto_scroll_btn_timer
|
id: auto_scroll_btn_timer
|
||||||
interval: control.animationTime
|
interval: control.animationTime * 2
|
||||||
repeat: false
|
repeat: false
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
message_list.positionViewAtIndex(message_list.currentIndex, ListView.Center)
|
message_list.positionViewAtIndex(message_list.currentIndex, ListView.Center)
|
||||||
|
@ -120,7 +120,7 @@ RibbonBlur {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
properties: "y"
|
properties: "y"
|
||||||
from: message_list.height
|
from: message_list.height
|
||||||
duration: control.animationTime / 2
|
duration: control.animationTime
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
remove: Transition {
|
remove: Transition {
|
||||||
|
@ -128,7 +128,7 @@ RibbonBlur {
|
||||||
property: "opacity"
|
property: "opacity"
|
||||||
from: 1
|
from: 1
|
||||||
to: 0
|
to: 0
|
||||||
duration: control.animationTime / 2
|
duration: control.animationTime
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ScrollBar.vertical: RibbonScrollBar {
|
ScrollBar.vertical: RibbonScrollBar {
|
||||||
|
@ -141,7 +141,7 @@ RibbonBlur {
|
||||||
}
|
}
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: control.animationTime / 2
|
duration: control.animationTime
|
||||||
easing.type: Easing.OutSine
|
easing.type: Easing.OutSine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ RibbonBlur {
|
||||||
color: RibbonTheme.isDarkMode ? Qt.rgba(0,0,0,0.5) : Qt.rgba(1,1,1,0.5)
|
color: RibbonTheme.isDarkMode ? Qt.rgba(0,0,0,0.5) : Qt.rgba(1,1,1,0.5)
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
ColorAnimation {
|
ColorAnimation {
|
||||||
duration: control.animationTime / 2
|
duration: control.animationTime
|
||||||
easing.type: Easing.OutSine
|
easing.type: Easing.OutSine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -240,6 +240,7 @@ RibbonBlur {
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearMessages(){
|
function clearMessages(){
|
||||||
|
folded_btn.checked = true
|
||||||
messageModel.clear()
|
messageModel.clear()
|
||||||
implicitHeight = 0
|
implicitHeight = 0
|
||||||
barHeight = 0
|
barHeight = 0
|
||||||
|
|
|
@ -21,7 +21,7 @@ RibbonBlur {
|
||||||
|
|
||||||
Behavior on implicitHeight {
|
Behavior on implicitHeight {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: control.animationTime / 2
|
duration: control.animationTime
|
||||||
easing.type: Easing.OutSine
|
easing.type: Easing.OutSine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,13 +31,13 @@ RibbonBlur {
|
||||||
onCountChanged: {
|
onCountChanged: {
|
||||||
message_list.currentIndex = count ? count - 1 : 0
|
message_list.currentIndex = count ? count - 1 : 0
|
||||||
if(count === 0)
|
if(count === 0)
|
||||||
folded_btn.checked = true
|
clearMessages()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer{
|
Timer{
|
||||||
id: auto_scroll_btn_timer
|
id: auto_scroll_btn_timer
|
||||||
interval: control.animationTime
|
interval: control.animationTime * 2
|
||||||
repeat: false
|
repeat: false
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
message_list.positionViewAtIndex(message_list.currentIndex, ListView.Center)
|
message_list.positionViewAtIndex(message_list.currentIndex, ListView.Center)
|
||||||
|
@ -120,7 +120,7 @@ RibbonBlur {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
properties: "y"
|
properties: "y"
|
||||||
from: message_list.height
|
from: message_list.height
|
||||||
duration: control.animationTime / 2
|
duration: control.animationTime
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
remove: Transition {
|
remove: Transition {
|
||||||
|
@ -128,7 +128,7 @@ RibbonBlur {
|
||||||
property: "opacity"
|
property: "opacity"
|
||||||
from: 1
|
from: 1
|
||||||
to: 0
|
to: 0
|
||||||
duration: control.animationTime / 2
|
duration: control.animationTime
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ScrollBar.vertical: RibbonScrollBar {
|
ScrollBar.vertical: RibbonScrollBar {
|
||||||
|
@ -141,7 +141,7 @@ RibbonBlur {
|
||||||
}
|
}
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: control.animationTime / 2
|
duration: control.animationTime
|
||||||
easing.type: Easing.OutSine
|
easing.type: Easing.OutSine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ RibbonBlur {
|
||||||
color: RibbonTheme.isDarkMode ? Qt.rgba(0,0,0,0.5) : Qt.rgba(1,1,1,0.5)
|
color: RibbonTheme.isDarkMode ? Qt.rgba(0,0,0,0.5) : Qt.rgba(1,1,1,0.5)
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
ColorAnimation {
|
ColorAnimation {
|
||||||
duration: control.animationTime / 2
|
duration: control.animationTime
|
||||||
easing.type: Easing.OutSine
|
easing.type: Easing.OutSine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -240,6 +240,7 @@ RibbonBlur {
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearMessages(){
|
function clearMessages(){
|
||||||
|
folded_btn.checked = true
|
||||||
messageModel.clear()
|
messageModel.clear()
|
||||||
implicitHeight = 0
|
implicitHeight = 0
|
||||||
barHeight = 0
|
barHeight = 0
|
||||||
|
|
Loading…
Reference in New Issue