HListView component with animations

This commit is contained in:
miruka 2019-05-13 13:15:03 -04:00
parent 4024eee460
commit 2da7214af1
8 changed files with 39 additions and 7 deletions

View File

@ -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

View 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 }
}
}
}

View File

@ -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

View File

@ -6,7 +6,7 @@ HRectangle {
color: HStyle.chat.roomEventList.background
ListView {
HListView {
id: roomEventListView
delegate: RoomEventDelegate {}
model: Backend.roomEvents.get(chatPage.roomId)

View File

@ -8,7 +8,7 @@ HColumnLayout {
Layout.leftMargin: roomSidePane.collapsed ? 0 : normalSpacing
Layout.rightMargin: Layout.leftMargin
ListView {
HListView {
id: memberList
spacing: parent.Layout.leftMargin

View File

@ -1,7 +1,8 @@
import QtQuick 2.7
import QtQuick.Layouts 1.3
import "../Base"
ListView {
HListView {
id: accountList
clip: true

View File

@ -2,7 +2,7 @@ import QtQuick 2.7
import QtQuick.Layouts 1.3
import "../Base"
ListView {
HListView {
property string userId: ""
id: roomCategoriesList

View File

@ -2,7 +2,7 @@ import QtQuick 2.7
import QtQuick.Layouts 1.3
import "../Base"
ListView {
HListView {
property string userId: ""
property string category: ""