From 64c430cd38761157bf644a7648f0ff2df801df93 Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Mon, 5 Feb 2024 11:12:19 +0100 Subject: [PATCH] account settings menu --- Linphone/data/CMakeLists.txt | 2 + Linphone/view/App/Layout/MainLayout.qml | 58 ++++++++++++++++++++----- Linphone/view/Style/AppIcons.qml | 2 + 3 files changed, 51 insertions(+), 11 deletions(-) diff --git a/Linphone/data/CMakeLists.txt b/Linphone/data/CMakeLists.txt index 424410ff7..27d050451 100644 --- a/Linphone/data/CMakeLists.txt +++ b/Linphone/data/CMakeLists.txt @@ -72,6 +72,8 @@ list(APPEND _LINPHONEAPP_RC_FILES data/assistant/use-app-sip-account.rc "data/image/bell-simple.svg" "data/image/bell-simple-slash.svg" "data/image/media_encryption_zrtp_pq.svg" + "data/image/question.svg" + "data/image/settings.svg" data/shaders/roundEffect.vert.qsb data/shaders/roundEffect.frag.qsb diff --git a/Linphone/view/App/Layout/MainLayout.qml b/Linphone/view/App/Layout/MainLayout.qml index fc8f85217..1d9339bb0 100644 --- a/Linphone/view/App/Layout/MainLayout.qml +++ b/Linphone/view/App/Layout/MainLayout.qml @@ -127,17 +127,6 @@ Item { onClicked: { accountList.open() } - } - Control.Button { - id: settingsButton - enabled: false - Layout.preferredWidth: 30 * DefaultStyle.dp - Layout.preferredHeight: 30 * DefaultStyle.dp - background: Item { - } - contentItem: Image { - source: AppIcons.more - } Popup{ id: accountList x: -width + parent.width @@ -150,6 +139,53 @@ Item { } } } + PopupButton { + id: settingsButton + Layout.preferredWidth: 24 * DefaultStyle.dp + Layout.preferredHeight: 24 * DefaultStyle.dp + popup.x: width - popup.width + popup.width: 271 * DefaultStyle.dp + popup.contentItem: ColumnLayout { + spacing: 20 * DefaultStyle.dp + IconLabelButton { + Layout.preferredHeight: 32 * DefaultStyle.dp + iconSize: 32 * DefaultStyle.dp + text: qsTr("Mon compte") + iconSource: AppIcons.manageProfile + onClicked: console.log("TODO : manage profile") + } + IconLabelButton { + Layout.preferredHeight: 32 * DefaultStyle.dp + iconSize: 32 * DefaultStyle.dp + text: qsTr("Paramètres") + iconSource: AppIcons.settings + } + IconLabelButton { + Layout.preferredHeight: 32 * DefaultStyle.dp + iconSize: 32 * DefaultStyle.dp + text: qsTr("Enregistrements") + iconSource: AppIcons.micro + } + IconLabelButton { + Layout.preferredHeight: 32 * DefaultStyle.dp + iconSize: 32 * DefaultStyle.dp + text: qsTr("Aide") + iconSource: AppIcons.question + } + Rectangle { + Layout.fillWidth: true + Layout.preferredHeight: 1 * DefaultStyle.dp + color: DefaultStyle.main2_400 + } + IconLabelButton { + Layout.preferredHeight: 32 * DefaultStyle.dp + iconSize: 32 * DefaultStyle.dp + text: qsTr("Ajouter un compte") + iconSource: AppIcons.plusCircle + onClicked: mainItem.addAccountRequest() + } + } + } } StackLayout { // width: parent.width diff --git a/Linphone/view/Style/AppIcons.qml b/Linphone/view/Style/AppIcons.qml index 8a062b8f4..93775960c 100644 --- a/Linphone/view/Style/AppIcons.qml +++ b/Linphone/view/Style/AppIcons.qml @@ -72,5 +72,7 @@ QtObject { property string shareNetwork: "image://internal/share-network.svg" property string bell: "image://internal/bell-simple.svg" property string bellSlash: "image://internal/bell-simple-slash.svg" + property string question: "image://internal/question.svg" + property string settings: "image://internal/settings.svg" }