Support user messages on the right even when wide
Limit maximum delegate width to ensure that the gap between user and non-user messages isn't too large
This commit is contained in:
@@ -17,7 +17,6 @@ import NeoChat.Menu.Timeline 1.0
|
||||
TimelineContainer {
|
||||
id: audioDelegate
|
||||
|
||||
width: ListView.view.width
|
||||
onReplyClicked: ListView.view.goToEvent(eventID)
|
||||
hoverComponent: hoverActions
|
||||
innerObject: Control {
|
||||
|
||||
@@ -10,7 +10,6 @@ import org.kde.neochat 1.0
|
||||
|
||||
TimelineContainer {
|
||||
id: encryptedDelegate
|
||||
width: ListView.view.width
|
||||
|
||||
innerObject: TextEdit {
|
||||
text: i18n("This message is encrypted and the sender has not shared the key with this device.")
|
||||
|
||||
@@ -15,7 +15,6 @@ import NeoChat.Menu.Timeline 1.0
|
||||
|
||||
TimelineContainer {
|
||||
id: fileDelegate
|
||||
width: ListView.view.width
|
||||
|
||||
onReplyClicked: ListView.view.goToEvent(eventID)
|
||||
hoverComponent: hoverActions
|
||||
|
||||
@@ -15,8 +15,6 @@ import NeoChat.Menu.Timeline 1.0
|
||||
TimelineContainer {
|
||||
id: imageDelegate
|
||||
|
||||
width: ListView.view.width
|
||||
|
||||
onReplyClicked: ListView.view.goToEvent(eventID)
|
||||
hoverComponent: hoverActions
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ import org.kde.neochat 1.0
|
||||
TimelineContainer {
|
||||
id: messageDelegate
|
||||
|
||||
width: ListView.view.width
|
||||
property bool isEmote: false
|
||||
|
||||
onReplyClicked: ListView.view.goToEvent(eventID)
|
||||
|
||||
@@ -19,12 +19,11 @@ QQC2.ItemDelegate {
|
||||
property bool isEmote: false
|
||||
property bool cardBackground: true
|
||||
|
||||
readonly property int delegateMaxWidth: Math.min(messageListView.width, Kirigami.Units.gridUnit * 40)
|
||||
readonly property int bubbleMaxWidth: Config.compactLayout && !Config.showAvatarInTimeline ? width - Kirigami.Units.largeSpacing * 4 : (Config.compactLayout ? width - Kirigami.Units.gridUnit * 2 - Kirigami.Units.largeSpacing * 4 : Math.min(width - Kirigami.Units.gridUnit * 2 - Kirigami.Units.largeSpacing * 6, Kirigami.Units.gridUnit * 20))
|
||||
|
||||
property bool showUserMessageOnRight: Config.showLocalMessagesOnRight &&
|
||||
model.author.isLocalUser &&
|
||||
!applicationWindow().wideScreen &&
|
||||
!Config.compactLayout
|
||||
model.author.isLocalUser && !Config.compactLayout
|
||||
|
||||
signal openExternally()
|
||||
signal replyClicked(string eventID)
|
||||
@@ -37,6 +36,7 @@ QQC2.ItemDelegate {
|
||||
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
width: delegateMaxWidth
|
||||
background: null
|
||||
property Item hoverComponent
|
||||
|
||||
|
||||
@@ -17,8 +17,6 @@ import NeoChat.Menu.Timeline 1.0
|
||||
TimelineContainer {
|
||||
id: videoDelegate
|
||||
|
||||
width: ListView.view.width
|
||||
|
||||
onReplyClicked: ListView.view.goToEvent(eventID)
|
||||
hoverComponent: hoverActions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user