1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-08-26 09:43:56 +02:00

messagelistview: ui fixes

1. Add handler for DataTransferMessageDelegate MouseArea
2. Fix TextMessageDelegate crash caused by Loader
3. Fix SBSMessageBase padding when resizing
4. Use JamiListView for MessageListView
5. Fix ScrollToBottomButton DropShadow
6. Fix Typing indicator binding loop

Change-Id: I59b97f3850fceb30f72c64f6cae54889fe4a18db
This commit is contained in:
Ming Rui Zhang 2021-10-04 15:53:00 -04:00 committed by Sébastien Blin
parent 45b86d56d9
commit 71b98aed56
7 changed files with 15 additions and 9 deletions

View file

@ -185,10 +185,15 @@ Loader {
JamiTheme.messageInTxtColor JamiTheme.messageInTxtColor
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
propagateComposedEvents: true
cursorShape: canOpen ? cursorShape: canOpen ?
Qt.PointingHandCursor : Qt.PointingHandCursor :
Qt.ArrowCursor Qt.ArrowCursor
onClicked: function (mouse) {
dataTransferItem.hoveredLink = canOpen ?
("file:///" + Body) : ""
if (dataTransferItem.hoveredLink)
Qt.openUrlExternally(dataTransferItem.hoveredLink)
}
} }
} }
Label { Label {

View file

@ -21,7 +21,7 @@ import QtQuick.Controls
import net.jami.Constants 1.1 import net.jami.Constants 1.1
Label { TextEdit {
id: root id: root
property string eText : "" property string eText : ""
@ -38,6 +38,9 @@ Label {
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
color: JamiTheme.textColor color: JamiTheme.textColor
readOnly: true
selectByMouse: true
TextMetrics { TextMetrics {
id: elided id: elided

View file

@ -40,6 +40,7 @@ TextField {
wrapMode: Text.Wrap wrapMode: Text.Wrap
readOnly: false readOnly: false
selectByMouse: true selectByMouse: true
mouseSelectionMode: TextInput.SelectCharacters
selectionColor: JamiTheme.placeholderTextColor selectionColor: JamiTheme.placeholderTextColor
font.pointSize: JamiTheme.materialLineEditPointSize font.pointSize: JamiTheme.materialLineEditPointSize

View file

@ -61,7 +61,7 @@ Control {
anchors.centerIn: parent anchors.centerIn: parent
width: parent.width width: parent.width - hPadding * 2
spacing: 2 spacing: 2

View file

@ -67,8 +67,6 @@ SBSMessageBase {
}, },
Loader { Loader {
id: extraContent id: extraContent
width: sourceComponent.width
height: sourceComponent.height
anchors.right: isOutgoing ? parent.right : undefined anchors.right: isOutgoing ? parent.right : undefined
property real minSize: 192 property real minSize: 192
property real maxSize: 320 property real maxSize: 320

View file

@ -28,7 +28,7 @@ import net.jami.Constants 1.1
import "../../commoncomponents" import "../../commoncomponents"
ListView { JamiListView {
id: root id: root
function getDistanceToBottom() { function getDistanceToBottom() {
@ -178,12 +178,9 @@ ListView {
displayMarginEnd: 4096 displayMarginEnd: 4096
maximumFlickVelocity: 2048 maximumFlickVelocity: 2048
verticalLayoutDirection: ListView.BottomToTop verticalLayoutDirection: ListView.BottomToTop
clip: true
boundsBehavior: Flickable.StopAtBounds boundsBehavior: Flickable.StopAtBounds
currentIndex: -1 currentIndex: -1
ScrollBar.vertical: ScrollBar {}
model: MessagesAdapter.messageListModel model: MessagesAdapter.messageListModel
delegate: DelegateChooser { delegate: DelegateChooser {

View file

@ -120,10 +120,12 @@ Control {
layer { layer {
enabled: true enabled: true
effect: DropShadow { effect: DropShadow {
z: -1
horizontalOffset: 3.0 horizontalOffset: 3.0
verticalOffset: 3.0 verticalOffset: 3.0
radius: 8.0 radius: 8.0
color: JamiTheme.shadowColor color: JamiTheme.shadowColor
transparentBorder: true
} }
} }
} }