From 6360e52eb51af049a2b71b2c5190be58ba3b2fb6 Mon Sep 17 00:00:00 2001 From: lcoursodon <liam.coursodon@savoirfairelinux.com> Date: Tue, 31 Oct 2023 09:55:58 -0400 Subject: [PATCH] Connection monitoring: ajust dark theme color Change-Id: I1225f1039859946ef2154820d45a6f9682b6ced1 --- src/app/constant/JamiTheme.qml | 6 +++--- src/app/settingsview/components/ChannelsPopup.qml | 12 ++++++++++-- .../components/ConnectionMonitoringTable.qml | 15 ++++++++++++--- .../components/TroubleshootSettingsPage.qml | 1 + 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/app/constant/JamiTheme.qml b/src/app/constant/JamiTheme.qml index 1e7c65d24..e644ccf2b 100644 --- a/src/app/constant/JamiTheme.qml +++ b/src/app/constant/JamiTheme.qml @@ -665,9 +665,9 @@ Item { property string donationUrl: "https://jami.net/donate/" //Connection monitoring - property color connectionMonitoringTableColor1: "#f0efef" - property color connectionMonitoringTableColor2: "#f6f5f5" - property color connectionMonitoringHeaderColor: "#d1d1d1" + property color connectionMonitoringTableColor1: darkTheme ? "#4D4D4D" : "#f0efef" + property color connectionMonitoringTableColor2: darkTheme ? "#333333" : "#f6f5f5" + property color connectionMonitoringHeaderColor: darkTheme ? "#6F6F6F" : "#d1d1d1" function setTheme(dark) { darkTheme = dark; diff --git a/src/app/settingsview/components/ChannelsPopup.qml b/src/app/settingsview/components/ChannelsPopup.qml index 4ef7ffa31..c7473858d 100644 --- a/src/app/settingsview/components/ChannelsPopup.qml +++ b/src/app/settingsview/components/ChannelsPopup.qml @@ -21,6 +21,7 @@ import QtQuick.Layouts import net.jami.Models 1.1 import net.jami.Adapters 1.1 import net.jami.Constants 1.1 +import "../../commoncomponents" Popup { id: popup @@ -39,10 +40,10 @@ Popup { contentHeight: textComponent.contentHeight + 10 contentWidth: textComponent.contentWidth + 20 clip: true - ScrollBar.vertical: ScrollBar { + ScrollBar.vertical: JamiScrollBar { active: contentHeight > height } - ScrollBar.horizontal: ScrollBar { + ScrollBar.horizontal: JamiScrollBar { active: contentWidth > width } contentX: 10 @@ -54,7 +55,14 @@ Popup { elide: Text.ElideRight horizontalAlignment: Text.AlignLeft text: popup.text + color: JamiTheme.textColor } } } + + background: Rectangle { + anchors.fill: parent + color: JamiTheme.backgroundColor + radius: 5 + } } diff --git a/src/app/settingsview/components/ConnectionMonitoringTable.qml b/src/app/settingsview/components/ConnectionMonitoringTable.qml index c770495f3..d813970d5 100644 --- a/src/app/settingsview/components/ConnectionMonitoringTable.qml +++ b/src/app/settingsview/components/ConnectionMonitoringTable.qml @@ -36,6 +36,7 @@ ListView { property int rota: 0 header: Rectangle { + color: JamiTheme.transparentColor height: 55 width: connectionMonitoringTable.width Rectangle { @@ -54,6 +55,7 @@ ListView { color: JamiTheme.transparentColor Text { id: textImage + color: JamiTheme.textColor anchors.leftMargin: 10 anchors.verticalCenter: parent.verticalCenter text: JamiStrings.contact @@ -67,6 +69,7 @@ ListView { color: JamiTheme.transparentColor Text { id: deviceText + color: JamiTheme.textColor anchors.verticalCenter: parent.verticalCenter text: JamiStrings.device } @@ -80,6 +83,7 @@ ListView { color: JamiTheme.transparentColor Text { id: connectionText + color: JamiTheme.textColor anchors.verticalCenter: parent.verticalCenter anchors.leftMargin: 10 text: JamiStrings.connection @@ -92,6 +96,7 @@ ListView { width: 70 color: JamiTheme.transparentColor Text { + color: JamiTheme.textColor anchors.verticalCenter: parent.verticalCenter text: JamiStrings.channels } @@ -168,6 +173,7 @@ ListView { Text { id: usernameText + color: JamiTheme.textColor text: UtilsAdapter.getBestNameForUri(CurrentAccount.id, PeerId) elide: Text.ElideRight } @@ -184,6 +190,7 @@ ListView { Text { id: idText + color: JamiTheme.textColor anchors.fill: parent text: UtilsAdapter.getBestIdForUri(CurrentAccount.id, PeerId) font.pixelSize: 12 @@ -204,7 +211,7 @@ ListView { tooltipContact.text = JamiStrings.copyAllData; } - ToolTip { + MaterialToolTip { id: tooltipContact visible: usernameText.font.underline text: JamiStrings.copyAllData @@ -223,6 +230,7 @@ ListView { color: delegate.color Text { id: delegateDeviceText + color: JamiTheme.textColor anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left text: { @@ -245,7 +253,7 @@ ListView { tooltipDevice.text = delegateDeviceText.text; } - ToolTip { + MaterialToolTip { id: tooltipDevice visible: delegateDeviceText.font.underline text: delegateDeviceText.text @@ -322,7 +330,7 @@ ListView { connectionText.font.underline = false; } - ToolTip { + MaterialToolTip { visible: connectionText.font.underline text: connectionText.tooltipText } @@ -337,6 +345,7 @@ ListView { color: delegate.color Text { id: channelText + color: JamiTheme.textColor anchors.verticalCenter: parent.verticalCenter anchors.leftMargin: 10 anchors.left: parent.left diff --git a/src/app/settingsview/components/TroubleshootSettingsPage.qml b/src/app/settingsview/components/TroubleshootSettingsPage.qml index 6e1be6d4b..73e2ed1d3 100644 --- a/src/app/settingsview/components/TroubleshootSettingsPage.qml +++ b/src/app/settingsview/components/TroubleshootSettingsPage.qml @@ -97,6 +97,7 @@ SettingsPageBase { id: connectionMonitoringTable height: listview.childrenRect.height + 60 width: tableWidth + color: JamiTheme.transparentColor ConnectionMonitoringTable { id: listview -- GitLab