HListView component with animations
This commit is contained in:
parent
4024eee460
commit
2da7214af1
|
@ -318,8 +318,9 @@ class SignalManager(QObject):
|
||||||
if not event.isLocalEcho:
|
if not event.isLocalEcho:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
sb = (event.dict["sender"], event.dict["body"])
|
sb = (event.dict.get("sender"), event.dict.get("body"))
|
||||||
new_sb = (new_event.dict["sender"], new_event.dict["body"])
|
new_sb = (new_event.dict.get("sender"),
|
||||||
|
new_event.dict.get("body"))
|
||||||
|
|
||||||
if sb == new_sb:
|
if sb == new_sb:
|
||||||
# The oldest matching local echo shall be replaced
|
# The oldest matching local echo shall be replaced
|
||||||
|
|
28
harmonyqml/components/Base/HListView.qml
Normal file
28
harmonyqml/components/Base/HListView.qml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
import QtQuick 2.7
|
||||||
|
|
||||||
|
ListView {
|
||||||
|
property int duration: HStyle.animationDurations
|
||||||
|
|
||||||
|
add: Transition {
|
||||||
|
NumberAnimation { properties: "x,y"; from: 100; duration: duration }
|
||||||
|
}
|
||||||
|
|
||||||
|
populate: Transition {
|
||||||
|
NumberAnimation { properties: "x,y"; duration: duration }
|
||||||
|
}
|
||||||
|
|
||||||
|
move: Transition {
|
||||||
|
NumberAnimation { properties: "x,y"; duration: duration }
|
||||||
|
}
|
||||||
|
|
||||||
|
displaced: Transition {
|
||||||
|
NumberAnimation { properties: "x,y"; duration: duration }
|
||||||
|
}
|
||||||
|
|
||||||
|
remove: Transition {
|
||||||
|
ParallelAnimation {
|
||||||
|
NumberAnimation { property: "opacity"; to: 0; duration: duration }
|
||||||
|
NumberAnimation { properties: "x,y"; to: 100; duration: duration }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,6 +4,8 @@ import QtQuick 2.7
|
||||||
QtObject {
|
QtObject {
|
||||||
id: style
|
id: style
|
||||||
|
|
||||||
|
property int animationDurations: 120
|
||||||
|
|
||||||
readonly property QtObject fontSize: QtObject {
|
readonly property QtObject fontSize: QtObject {
|
||||||
property int smallest: 6
|
property int smallest: 6
|
||||||
property int smaller: 8
|
property int smaller: 8
|
||||||
|
|
|
@ -6,7 +6,7 @@ HRectangle {
|
||||||
|
|
||||||
color: HStyle.chat.roomEventList.background
|
color: HStyle.chat.roomEventList.background
|
||||||
|
|
||||||
ListView {
|
HListView {
|
||||||
id: roomEventListView
|
id: roomEventListView
|
||||||
delegate: RoomEventDelegate {}
|
delegate: RoomEventDelegate {}
|
||||||
model: Backend.roomEvents.get(chatPage.roomId)
|
model: Backend.roomEvents.get(chatPage.roomId)
|
||||||
|
|
|
@ -8,7 +8,7 @@ HColumnLayout {
|
||||||
Layout.leftMargin: roomSidePane.collapsed ? 0 : normalSpacing
|
Layout.leftMargin: roomSidePane.collapsed ? 0 : normalSpacing
|
||||||
Layout.rightMargin: Layout.leftMargin
|
Layout.rightMargin: Layout.leftMargin
|
||||||
|
|
||||||
ListView {
|
HListView {
|
||||||
id: memberList
|
id: memberList
|
||||||
|
|
||||||
spacing: parent.Layout.leftMargin
|
spacing: parent.Layout.leftMargin
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
|
import "../Base"
|
||||||
|
|
||||||
ListView {
|
HListView {
|
||||||
id: accountList
|
id: accountList
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import QtQuick 2.7
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import "../Base"
|
import "../Base"
|
||||||
|
|
||||||
ListView {
|
HListView {
|
||||||
property string userId: ""
|
property string userId: ""
|
||||||
|
|
||||||
id: roomCategoriesList
|
id: roomCategoriesList
|
||||||
|
|
|
@ -2,7 +2,7 @@ import QtQuick 2.7
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import "../Base"
|
import "../Base"
|
||||||
|
|
||||||
ListView {
|
HListView {
|
||||||
property string userId: ""
|
property string userId: ""
|
||||||
property string category: ""
|
property string category: ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user