From c4c2415d6b81bbeec7fa6b8036aece88af88b0ad Mon Sep 17 00:00:00 2001 From: lcoursodon Date: Mon, 11 Dec 2023 16:11:43 -0500 Subject: [PATCH] Connection monitoring : Correct layout after migration Change-Id: I8c480be77e1ef0a8778d4e8420523b71c76c4555 --- src/app/connectioninfolistmodel.cpp | 1 - .../components/ConnectionMonitoringTable.qml | 10 ++++++++-- .../components/TroubleshootSettingsPage.qml | 9 ++++++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/app/connectioninfolistmodel.cpp b/src/app/connectioninfolistmodel.cpp index 99f1a808..fc192c65 100644 --- a/src/app/connectioninfolistmodel.cpp +++ b/src/app/connectioninfolistmodel.cpp @@ -44,7 +44,6 @@ ConnectionInfoListModel::data(const QModelIndex& index, int role) const } const auto peerId = peerIds_[index.row()]; const auto peerData = peerData_[peerId]; - switch (role) { case ConnectionInfoList::ChannelsMap: { QVariantMap channelsMapMap; diff --git a/src/app/settingsview/components/ConnectionMonitoringTable.qml b/src/app/settingsview/components/ConnectionMonitoringTable.qml index d813970d..ca650112 100644 --- a/src/app/settingsview/components/ConnectionMonitoringTable.qml +++ b/src/app/settingsview/components/ConnectionMonitoringTable.qml @@ -29,6 +29,7 @@ ListView { height: contentItem.childrenRect.height anchors.top: parent.top anchors.topMargin: 10 + width: parent.width spacing: 5 cacheBuffer: 10 @@ -51,7 +52,7 @@ ListView { id: profile height: 50 Layout.leftMargin: 5 - Layout.preferredWidth: 210 + Layout.preferredWidth: 200 color: JamiTheme.transparentColor Text { id: textImage @@ -65,6 +66,7 @@ ListView { Rectangle { id: device Layout.fillWidth: true + Layout.minimumWidth: 50 height: 50 color: JamiTheme.transparentColor Text { @@ -106,6 +108,7 @@ ListView { } model: ConnectionInfoListModel + Timer { interval: 1000 running: root.visible @@ -125,6 +128,7 @@ ListView { ListView { id: listView2 height: 40 * Count + width: parent.width anchors.top: delegate.top @@ -141,7 +145,7 @@ ListView { id: profile height: 50 Layout.leftMargin: 5 - Layout.preferredWidth: 210 + Layout.preferredWidth: 200 color: JamiTheme.transparentColor Avatar { id: avatar @@ -174,6 +178,7 @@ ListView { Text { id: usernameText color: JamiTheme.textColor + anchors.fill: parent text: UtilsAdapter.getBestNameForUri(CurrentAccount.id, PeerId) elide: Text.ElideRight } @@ -227,6 +232,7 @@ ListView { Rectangle { height: 40 Layout.fillWidth: true + Layout.minimumWidth: 50 color: delegate.color Text { id: delegateDeviceText diff --git a/src/app/settingsview/components/TroubleshootSettingsPage.qml b/src/app/settingsview/components/TroubleshootSettingsPage.qml index 73e2ed1d..65b0c3cd 100644 --- a/src/app/settingsview/components/TroubleshootSettingsPage.qml +++ b/src/app/settingsview/components/TroubleshootSettingsPage.qml @@ -30,6 +30,7 @@ SettingsPageBase { id: root Layout.fillWidth: true + Layout.minimumWidth: 700 readonly property string baseProviderPrefix: 'image://avatarImage' @@ -96,7 +97,13 @@ SettingsPageBase { Rectangle { id: connectionMonitoringTable height: listview.childrenRect.height + 60 - width: tableWidth + width: { + if (tableWidth > 477) { + return tableWidth; + } else { + return 477; + } + } color: JamiTheme.transparentColor ConnectionMonitoringTable {