UI fixes:

mark chat as read if message received while conversation is opened and at end #LINQT-2442

remove warnings

revert flickable change in abstract settings layout leading to mouse focus issue
This commit is contained in:
Gaelle Braud 2026-03-17 17:31:48 +01:00
parent ef39a82fc8
commit 7c590e16df
4 changed files with 24 additions and 7 deletions

View file

@ -173,7 +173,7 @@ bool Notifier::createNotification(Notifier::NotificationType type, QVariantMap d
// to have the Window on Top and fullscreen independant // to have the Window on Top and fullscreen independant
window->setFlags((showAsTool ? Qt::Tool : Qt::WindowStaysOnTopHint) | window->setFlags((showAsTool ? Qt::Tool : Qt::WindowStaysOnTopHint) |
Qt::FramelessWindowHint); Qt::FramelessWindowHint);
#ifdef Q_OS_LINUX || Q_OS_WIN #if defined(Q_OS_LINUX) || defined(Q_OS_WIN)
window->setFlag(Qt::WindowDoesNotAcceptFocus); window->setFlag(Qt::WindowDoesNotAcceptFocus);
#endif #endif
// for (auto it = data.begin(); it != data.end(); ++it) // for (auto it = data.begin(); it != data.end(); ++it)

View file

@ -76,11 +76,25 @@ ListView {
} }
} }
onAtYBeginningChanged: if (atYBeginning && count !== 0) { onAtYBeginningChanged: {
eventLogProxy.displayMore() if (atYBeginning && count !== 0) {
eventLogProxy.displayMore()
}
} }
onAtYEndChanged: if (atYEnd && chat && count !== 0) { onAtYEndChanged: {
chat.core.lMarkAsRead() if (atYEnd && chat && count !== 0) {
chat.core.lMarkAsRead()
}
}
Connections {
// enabled: chat !== null
target: mainItem.chat ? mainItem.chat.core : null
function onUnreadMessagesCountChanged() {
if (mainItem.atYEnd){
mainItem.chat.core.lMarkAsRead()
}
}
} }
model: EventLogProxy { model: EventLogProxy {

View file

@ -100,7 +100,7 @@ Rectangle {
} }
} }
} }
Flickable { Control.ScrollView {
id: scrollView id: scrollView
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
@ -108,6 +108,8 @@ Rectangle {
anchors.top: header.bottom anchors.top: header.bottom
anchors.topMargin: Utils.getSizeWithScreenRatio(16) anchors.topMargin: Utils.getSizeWithScreenRatio(16)
contentHeight: contentListView.contentHeight contentHeight: contentListView.contentHeight
// Workaround for the ScrollView to cover the whole page
Item{anchors.fill: parent}
Control.ScrollBar.vertical: ScrollBar { Control.ScrollBar.vertical: ScrollBar {
active: contentListView.contentHeight > scrollView.height active: contentListView.contentHeight > scrollView.height
visible: contentListView.contentHeight > scrollView.height visible: contentListView.contentHeight > scrollView.height

View file

@ -153,6 +153,7 @@ AbstractSettingsLayout {
id: audioCodecsComponent id: audioCodecsComponent
ColumnLayout { ColumnLayout {
ListView { ListView {
id: audioCodecsList
Layout.preferredHeight: contentHeight Layout.preferredHeight: contentHeight
Layout.fillWidth: true Layout.fillWidth: true
spacing: Utils.getSizeWithScreenRatio(20) spacing: Utils.getSizeWithScreenRatio(20)
@ -160,7 +161,7 @@ AbstractSettingsLayout {
filterType: PayloadTypeProxy.Audio | PayloadTypeProxy.NotDownloadable filterType: PayloadTypeProxy.Audio | PayloadTypeProxy.NotDownloadable
} }
delegate: SwitchSetting { delegate: SwitchSetting {
width: parent.width width: audioCodecsList.width
height: Utils.getSizeWithScreenRatio(32) height: Utils.getSizeWithScreenRatio(32)
titleText: Utils.capitalizeFirstLetter(modelData.core.mimeType) titleText: Utils.capitalizeFirstLetter(modelData.core.mimeType)
subTitleText: modelData.core.clockRate + " Hz" subTitleText: modelData.core.clockRate + " Hz"