mainview: account combo box visible from settings menu
Change-Id: I8eafea9d1cf07a11a8780f8d2f3495480b2360ed
diff --git a/src/mainview/components/AccountComboBox.qml b/src/mainview/components/AccountComboBox.qml
index 3175068..fac5b11 100644
--- a/src/mainview/components/AccountComboBox.qml
+++ b/src/mainview/components/AccountComboBox.qml
@@ -241,7 +241,8 @@
width: 25
height: 25
- source: "qrc:/images/icons/round-settings-24px.svg"
+ source: !mainViewWindow.inSettingsView ? "qrc:/images/icons/round-settings-24px.svg" :
+ "qrc:/images/icons/round-close-24px.svg"
backgroundColor: "white"
onClicked: {
settingBtnClicked()
diff --git a/src/mainview/components/AccountComboBoxPopup.qml b/src/mainview/components/AccountComboBoxPopup.qml
index 0d0c284..7f0974a 100644
--- a/src/mainview/components/AccountComboBoxPopup.qml
+++ b/src/mainview/components/AccountComboBoxPopup.qml
@@ -40,9 +40,9 @@
*/
implicitHeight: {
comboBoxPopup.visible
- return Math.min(accountComboBox.height * Math.min(
- 5, accountListModel.rowCount() + 1),
- sidePanelRect.height)
+ return Math.min(accountComboBox.height *
+ Math.min(5, accountListModel.rowCount() + 1),
+ mainViewSidePanelRect.height)
}
padding: 0
diff --git a/src/mainview/components/AudioCallPage.qml b/src/mainview/components/AudioCallPage.qml
index 9c3f46c..0a85cf2 100644
--- a/src/mainview/components/AudioCallPage.qml
+++ b/src/mainview/components/AudioCallPage.qml
@@ -75,7 +75,7 @@
handle: Rectangle {
implicitWidth: audioCallPageRect.width
- implicitHeight: JamiTheme.splitViewHandlePreferedWidth
+ implicitHeight: JamiTheme.splitViewHandlePreferredWidth
color: SplitHandle.pressed ? JamiTheme.pressColor : (SplitHandle.hovered ? JamiTheme.hoverColor : JamiTheme.tabbarBorderColor)
}
diff --git a/src/mainview/components/SidePanel.qml b/src/mainview/components/SidePanel.qml
index 1dc1834..0500a79 100644
--- a/src/mainview/components/SidePanel.qml
+++ b/src/mainview/components/SidePanel.qml
@@ -37,7 +37,6 @@
signal accountSignalsReconnect(string accountId)
signal needToUpdateConversationForAddedContact
signal needToAddNewAccount
- signal settingBtnClicked_AccountComboBox
/*
@@ -117,67 +116,16 @@
conversationSmartListView.updateConversationSmartListView()
}
+ function updateSmartList(accountId) {
+ conversationSmartListView.currentIndex = -1
+ conversationSmartListView.updateSmartList(accountId)
+ }
/*
* Intended -> since strange behavior will happen without this for stackview.
*/
anchors.top: parent.top
-
- AccountComboBox {
- id: accountComboBox
-
- anchors.top: sidePanelRect.top
- width: sidePanelRect.width
- height: 64
-
- currentIndex: 0
-
- Connections {
- target: ClientWrapper.accountAdaptor
-
- function onAccountSignalsReconnect(accountId) {
- CallAdapter.connectCallStatusChanged(accountId)
- ConversationsAdapter.accountChangedSetUp(accountId)
- sidePanelRect.accountSignalsReconnect(accountId)
- }
-
- function onUpdateConversationForAddedContact() {
- sidePanelRect.needToUpdateConversationForAddedContact()
- }
-
- function onAccountStatusChanged() {
- accountComboBox.updateAccountListModel()
- }
- }
-
- onSettingBtnClicked: {
- settingBtnClicked_AccountComboBox()
- }
-
- onAccountChanged: {
- ClientWrapper.accountAdaptor.accountChanged(index)
- refreshAccountComboBox(0)
- sidePanelRect.accountComboBoxNeedToShowWelcomePage(0)
- }
-
- onNeedToUpdateSmartList: {
- conversationSmartListView.currentIndex = -1
- conversationSmartListView.updateSmartList(accountId)
- }
-
- onNeedToBackToWelcomePage: {
- sidePanelRect.accountComboBoxNeedToShowWelcomePage(index)
- }
-
- onNewAccountButtonClicked: {
- sidePanelRect.needToAddNewAccount()
- }
-
- Component.onCompleted: {
- ClientWrapper.accountAdaptor.setQmlObject(this)
- ClientWrapper.accountAdaptor.accountChanged(0)
- }
- }
+ anchors.fill: parent
/*
* Search bar container to embed search label
@@ -186,7 +134,7 @@
id: contactSearchBar
width: sidePanelRect.width - 26
height: 35
- anchors.top: accountComboBox.bottom
+ anchors.top: sidePanelRect.top
anchors.topMargin: 10
anchors.left: sidePanelRect.left
anchors.leftMargin: 16
@@ -211,8 +159,8 @@
anchors.top: tabBarVisible ? sidePanelTabBar.bottom : contactSearchBar.bottom
anchors.topMargin: tabBarVisible ? 0 : 10
width: parent.width
- height: tabBarVisible ? sidePanelRect.height - sidePanelTabBar.height - contactSearchBar.height - accountComboBox.height - 20 :
- sidePanelRect.height - contactSearchBar.height - accountComboBox.height - 20
+ height: tabBarVisible ? sidePanelRect.height - sidePanelTabBar.height - contactSearchBar.height - 20 :
+ sidePanelRect.height - contactSearchBar.height - 20
Connections {
target: ConversationsAdapter
diff --git a/src/mainview/components/VideoCallPage.qml b/src/mainview/components/VideoCallPage.qml
index 047e332..105f7c8 100644
--- a/src/mainview/components/VideoCallPage.qml
+++ b/src/mainview/components/VideoCallPage.qml
@@ -157,7 +157,7 @@
handle: Rectangle {
implicitWidth: videoCallPageRect.width
- implicitHeight: JamiTheme.splitViewHandlePreferedWidth
+ implicitHeight: JamiTheme.splitViewHandlePreferredWidth
color: SplitHandle.pressed ? JamiTheme.pressColor : (SplitHandle.hovered ? JamiTheme.hoverColor : JamiTheme.tabbarBorderColor)
}
diff --git a/src/mainview/components/WelcomePage.qml b/src/mainview/components/WelcomePage.qml
index 85aea30..3563eea 100644
--- a/src/mainview/components/WelcomePage.qml
+++ b/src/mainview/components/WelcomePage.qml
@@ -28,13 +28,14 @@
property int currentAccountIndex: 0
property int buttonPreferredSize: 30
+ anchors.fill: parent
Rectangle {
id: welcomeRectComponentsGroup
anchors.centerIn: parent
- width: Math.max(welcomePageGroupPreferedWidth, welcomeRect.width - 100)
+ width: Math.max(mainViewStackPreferredWidth, welcomeRect.width - 100)
height: mainViewWindow.minimumHeight
ColumnLayout {