HListView component with animations
This commit is contained in:
parent
4024eee460
commit
2da7214af1
|
@ -318,8 +318,9 @@ class SignalManager(QObject):
|
|||
if not event.isLocalEcho:
|
||||
continue
|
||||
|
||||
sb = (event.dict["sender"], event.dict["body"])
|
||||
new_sb = (new_event.dict["sender"], new_event.dict["body"])
|
||||
sb = (event.dict.get("sender"), event.dict.get("body"))
|
||||
new_sb = (new_event.dict.get("sender"),
|
||||
new_event.dict.get("body"))
|
||||
|
||||
if sb == new_sb:
|
||||
# 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 {
|
||||
id: style
|
||||
|
||||
property int animationDurations: 120
|
||||
|
||||
readonly property QtObject fontSize: QtObject {
|
||||
property int smallest: 6
|
||||
property int smaller: 8
|
||||
|
|
|
@ -6,7 +6,7 @@ HRectangle {
|
|||
|
||||
color: HStyle.chat.roomEventList.background
|
||||
|
||||
ListView {
|
||||
HListView {
|
||||
id: roomEventListView
|
||||
delegate: RoomEventDelegate {}
|
||||
model: Backend.roomEvents.get(chatPage.roomId)
|
||||
|
|
|
@ -8,7 +8,7 @@ HColumnLayout {
|
|||
Layout.leftMargin: roomSidePane.collapsed ? 0 : normalSpacing
|
||||
Layout.rightMargin: Layout.leftMargin
|
||||
|
||||
ListView {
|
||||
HListView {
|
||||
id: memberList
|
||||
|
||||
spacing: parent.Layout.leftMargin
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Layouts 1.3
|
||||
import "../Base"
|
||||
|
||||
ListView {
|
||||
HListView {
|
||||
id: accountList
|
||||
clip: true
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import QtQuick 2.7
|
|||
import QtQuick.Layouts 1.3
|
||||
import "../Base"
|
||||
|
||||
ListView {
|
||||
HListView {
|
||||
property string userId: ""
|
||||
|
||||
id: roomCategoriesList
|
||||
|
|
|
@ -2,7 +2,7 @@ import QtQuick 2.7
|
|||
import QtQuick.Layouts 1.3
|
||||
import "../Base"
|
||||
|
||||
ListView {
|
||||
HListView {
|
||||
property string userId: ""
|
||||
property string category: ""
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user