1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-09-10 12:03:18 +02:00

mainview: account combo box visible from settings menu

Change-Id: I8eafea9d1cf07a11a8780f8d2f3495480b2360ed
This commit is contained in:
ababi 2020-08-10 12:33:34 +02:00 committed by Sébastien Blin
parent 470d3c98e6
commit a284cae16d
15 changed files with 954 additions and 837 deletions

View file

@ -73,7 +73,7 @@ Item {
property string faddedFontColor: "#c0c0c0"
property string faddedLastInteractionFontColor: "#505050"
property int splitViewHandlePreferedWidth: 4
property int splitViewHandlePreferredWidth: 4
property int textFontSize: 9
property int titleFontSize: 16
property int menuFontSize: 12

View file

@ -30,58 +30,119 @@ import net.jami.Models 1.0
*/
import "components"
import "../settingsview"
import "../settingsview/components"
Window {
id: mainViewWindow
property int minWidth: sidePanelViewStackPreferedWidth
property int minWidth: sidePanelViewStackPreferredWidth
property int minHeight: aboutPopUpDialog.contentHeight
property int mainViewWindowPreferedWidth: 650
property int mainViewWindowPreferedHeight: 600
property int sidePanelViewStackPreferedWidth: 250
property int welcomePageGroupPreferedWidth: 250
property int aboutPopUpPreferedWidth: 250
property int mainViewWindowPreferredWidth: 650
property int mainViewWindowPreferredHeight: 600
property int sidePanelViewStackPreferredWidth: 250
property int mainViewStackPreferredWidth: 250
property int aboutPopUpPreferredWidth: 250
property int savedSidePanelViewMinWidth: 0
property int savedSidePanelViewMaxWidth: 0
property int savedWelcomeViewMinWidth: 0
property int savedWelcomeViewMaxWidth: 0
property bool hiddenView: false
property bool sidePanelHidden: false
/*
* To calculate tab bar bottom border hidden rect left margin.
*/
property int tabBarLeftMargin: 8
property int tabButtonShrinkSize: 8
property bool inSettingsView: false
property bool needToShowCallStack: false
property bool needToCloseCallStack: false
signal noAccountIsAvailable
signal needToAddNewAccount
signal closeApp
function pushCallStackView(){
if (mainViewStack.visible) {
mainViewStack.pop(null, StackView.Immediate)
mainViewStack.push(callStackView, StackView.Immediate)
} else {
sidePanelViewStack.pop(null, StackView.Immediate)
sidePanelViewStack.push(callStackView, StackView.Immediate)
}
}
function pushCommunicationMessageWebView(){
if (mainViewStack.visible) {
mainViewStack.pop(null, StackView.Immediate)
mainViewStack.push(communicationPageMessageWebView,
StackView.Immediate)
} else {
sidePanelViewStack.pop(null, StackView.Immediate)
sidePanelViewStack.push(
communicationPageMessageWebView,
StackView.Immediate)
}
}
function newAccountAdded(index) {
mainViewWindowSidePanel.refreshAccountComboBox(index)
}
function recursionStackViewItemMove(stackOne, stackTwo) {
function recursionStackViewItemMove(stackOne, stackTwo, depth=1) {
/*
* Move all items (expect the bottom item) to stacktwo by the same order in stackone.
*/
if (stackOne.depth === 1) {
if (stackOne.depth === depth) {
return
}
var tempItem = stackOne.pop(StackView.Immediate)
recursionStackViewItemMove(stackOne, stackTwo)
recursionStackViewItemMove(stackOne, stackTwo, depth)
stackTwo.push(tempItem, StackView.Immediate)
}
function toggleSettingsView() {
if (!inSettingsView) {
if (sidePanelHidden){
recursionStackViewItemMove(sidePanelViewStack, mainViewStack, 1)
mainViewStack.push(settingsView, StackView.Immediate)
sidePanelViewStack.push(leftPanelSettingsView, StackView.Immediate)
recursionStackViewItemMove(mainViewStack, sidePanelViewStack, 1)
} else {
mainViewStack.push(settingsView, StackView.Immediate)
sidePanelViewStack.push(leftPanelSettingsView, StackView.Immediate)
}
} else {
if (!sidePanelHidden) {
sidePanelViewStack.pop(mainViewWindowSidePanel, StackView.Immediate)
mainViewStack.pop(StackView.Immediate)
} else {
recursionStackViewItemMove(sidePanelViewStack, mainViewStack, 2)
sidePanelViewStack.pop(StackView.Immediate)
mainViewStack.pop(StackView.Immediate)
recursionStackViewItemMove(mainViewStack, sidePanelViewStack, 1)
}
if (needToCloseCallStack) {
pushCommunicationMessageWebView()
needToShowCallStack = false
needToCloseCallStack = false
}
}
inSettingsView = !inSettingsView
}
title: "Jami"
visible: true
width: mainViewWindowPreferedWidth
height: mainViewWindowPreferedHeight
width: mainViewWindowPreferredWidth
height: mainViewWindowPreferredHeight
minimumWidth: minWidth
minimumHeight: minHeight
@ -89,6 +150,8 @@ Window {
target: CallAdapter
function onShowCallStack(accountId, convUid, forceReset) {
needToShowCallStack = true
if (forceReset) {
callStackView.responsibleAccountId = accountId
callStackView.responsibleConvUid = convUid
@ -101,13 +164,7 @@ Window {
*/
if (callStackView.responsibleAccountId === accountId
&& callStackView.responsibleConvUid === convUid) {
if (welcomeViewStack.visible) {
welcomeViewStack.pop(null, StackView.Immediate)
welcomeViewStack.push(callStackView, StackView.Immediate)
} else {
sidePanelViewStack.pop(null, StackView.Immediate)
sidePanelViewStack.push(callStackView, StackView.Immediate)
}
pushCallStackView()
}
}
@ -120,22 +177,20 @@ Window {
/*
* Check if call stack view is on any of the stackview.
*/
if (responsibleCallId === callId || responsibleCallId.length === 0) {
if (welcomeViewStack.find(function (item, index) {
if (callStackView.responsibleAccountId === accountId
&& callStackView.responsibleConvUid === convUid) {
if (mainViewStack.find(function (item, index) {
return item.objectName === "callStackViewObject"
}) || sidePanelViewStack.find(function (item, index) {
return item.objectName === "callStackViewObject"
})) {
}) || (inSettingsView && needToShowCallStack)) {
callStackView.needToCloseInCallConversationAndPotentialWindow()
if (welcomeViewStack.visible) {
welcomeViewStack.pop(null, StackView.Immediate)
welcomeViewStack.push(communicationPageMessageWebView,
StackView.Immediate)
if (!inSettingsView) {
pushCommunicationMessageWebView()
needToShowCallStack = false
} else {
sidePanelViewStack.pop(null, StackView.Immediate)
sidePanelViewStack.push(
communicationPageMessageWebView,
StackView.Immediate)
needToCloseCallStack = true
}
}
}
@ -143,12 +198,15 @@ Window {
function onIncomingCallNeedToSetupMainView(accountId, convUid) {
/*
* Set up the call stack view that is needed by call overlay.
*/
welcomeViewStack.pop(null, StackView.Immediate)
sidePanelViewStack.pop(null, StackView.Immediate)
if (!inSettingsView) {
mainViewStack.pop(null, StackView.Immediate)
sidePanelViewStack.pop(null, StackView.Immediate)
} else {
toggleSettingsView()
}
var index = ClientWrapper.utilsAdaptor.getCurrAccList().indexOf(accountId)
var name = ClientWrapper.utilsAdaptor.getBestName(accountId, convUid)
@ -189,7 +247,7 @@ Window {
height: mainViewWindow.height
handle: Rectangle {
implicitWidth: JamiTheme.splitViewHandlePreferedWidth
implicitWidth: JamiTheme.splitViewHandlePreferredWidth
implicitHeight: splitView.height
color:"transparent"
Rectangle {
@ -199,60 +257,165 @@ Window {
}
}
StackView {
id: sidePanelViewStack
initialItem: mainViewWindowSidePanel
SplitView.maximumWidth: splitView.width - sidePanelViewStackPreferedWidth
SplitView.minimumWidth: sidePanelViewStackPreferedWidth
Rectangle {
id: mainViewSidePanelRect
SplitView.minimumWidth: sidePanelViewStackPreferredWidth
SplitView.maximumWidth: (sidePanelHidden ? splitView.width :
splitView.width - sidePanelViewStackPreferredWidth)
SplitView.fillHeight: true
clip: true
/*
* AccountComboBox is always visible
*/
AccountComboBox {
id: accountComboBox
anchors.top: mainViewSidePanelRect.top
width: mainViewSidePanelRect.width
height: 64
visible: (mainViewWindowSidePanel.visible || leftPanelSettingsView.visible)
currentIndex: 0
Connections {
target: ClientWrapper.accountAdaptor
function onAccountSignalsReconnect(accountId) {
CallAdapter.connectCallModel(accountId)
ConversationsAdapter.accountChangedSetUp(accountId)
mainViewWindowSidePanel.accountSignalsReconnect(accountId)
}
function onUpdateConversationForAddedContact() {
mainViewWindowSidePanel.needToUpdateConversationForAddedContact()
}
function onAccountStatusChanged() {
accountComboBox.updateAccountListModel()
}
}
onSettingBtnClicked: {
toggleSettingsView()
}
onAccountChanged: {
ClientWrapper.accountAdaptor.accountChanged(index)
mainViewWindowSidePanel.refreshAccountComboBox(0)
settingsView.slotAccountListChanged()
settingsView.setSelected(settingsView.selectedMenu, true)
if (needToShowCallStack
&& callStackView.responsibleAccountId === ClientWrapper.utilsAdaptor.getCurrAccId()){
if (!ClientWrapper.accountAdaptor.hasVideoCall()) {
pushCommunicationMessageWebView()
needToShowCallStack = false
} else if (needToShowCallStack) {
pushCallStackView()
}
}
}
onNeedToUpdateSmartList: {
mainViewWindowSidePanel.updateSmartList(accountId)
}
onNeedToBackToWelcomePage: {
if (!inSettingsView)
mainViewWindowSidePanel.accountComboBoxNeedToShowWelcomePage(index)
}
onNewAccountButtonClicked: {
mainViewWindowSidePanel.needToAddNewAccount()
}
Component.onCompleted: {
ClientWrapper.accountAdaptor.setQmlObject(this)
}
}
StackView {
id: sidePanelViewStack
initialItem: mainViewWindowSidePanel
anchors.top: accountComboBox.visible ? accountComboBox.bottom : mainViewSidePanelRect.top
width: mainViewSidePanelRect.width
height: accountComboBox.visible ? mainViewSidePanelRect.height - accountComboBox.height :
mainViewSidePanelRect.height
clip: true
}
}
StackView {
id: welcomeViewStack
id: mainViewStack
initialItem: welcomePage
SplitView.maximumWidth: hiddenView ? splitView.width : splitView.width - sidePanelViewStackPreferedWidth
SplitView.minimumWidth: sidePanelViewStackPreferedWidth
SplitView.maximumWidth: sidePanelHidden ? splitView.width : splitView.width - sidePanelViewStackPreferredWidth
SplitView.minimumWidth: sidePanelViewStackPreferredWidth
SplitView.fillHeight: true
clip: true
}
}
SettingsView {
id: settingsView
Layout.fillWidth: true
Layout.fillHeight: true
onSettingsViewWindowNeedToShowMainViewWindow: {
mainViewWindowSidePanel.refreshAccountComboBox(
accountDeleted ? 0 : -1)
mainViewStackLayout.currentIndex = 0
}
onSettingsViewWindowNeedToShowNewWizardWindow: {
mainViewWindow.noAccountIsAvailable()
}
}
}
AccountListModel {
id: accountListModel
}
LeftPanelView {
id: leftPanelSettingsView
visible: false
contentViewportWidth: mainViewSidePanelRect.width
contentViewPortHeight: mainViewSidePanelRect.height
Connections {
target: leftPanelSettingsView.btnAccountSettings
function onCheckedToggledForRightPanel(checked) {
settingsView.setSelected(SettingsView.Account)
if (sidePanelHidden) {
recursionStackViewItemMove(mainViewStack, sidePanelViewStack, 1)
}
}
}
Connections {
target: leftPanelSettingsView.btnGeneralSettings
function onCheckedToggledForRightPanel(checked) {
settingsView.setSelected(SettingsView.General)
if (sidePanelHidden) {
recursionStackViewItemMove(mainViewStack, sidePanelViewStack, 1)
}
}
}
Connections {
target: leftPanelSettingsView.btnMediaSettings
function onCheckedToggledForRightPanel(checked) {
settingsView.setSelected(SettingsView.Media)
if (sidePanelHidden) {
recursionStackViewItemMove(mainViewStack, sidePanelViewStack, 1)
}
}
}
Connections {
target: leftPanelSettingsView.btnPluginSettings
function onCheckedToggledForRightPanel(checked) {
settingsView.setSelected(SettingsView.Plugin)
if (sidePanelHidden) {
recursionStackViewItemMove(mainViewStack, sidePanelViewStack, 1)
}
}
}
}
SidePanel {
id: mainViewWindowSidePanel
onSettingBtnClicked_AccountComboBox: {
mainViewStackLayout.currentIndex = 1
}
onConversationSmartListNeedToAccessMessageWebView: {
communicationPageMessageWebView.headerUserAliasLabelText = currentUserAlias
@ -288,7 +451,7 @@ Window {
callStackView.setLinkedWebview(
communicationPageMessageWebView)
if (welcomeViewStack.find(function (item, index) {
if (mainViewStack.find(function (item, index) {
return item.objectName === "communicationPageMessageWebView"
}) || sidePanelViewStack.find(function (item, index) {
return item.objectName === "communicationPageMessageWebView"
@ -301,24 +464,24 @@ Window {
/*
* Push messageWebView or callStackView onto the correct stackview
*/
welcomeViewStack.pop(null, StackView.Immediate)
mainViewStack.pop(null, StackView.Immediate)
sidePanelViewStack.pop(null, StackView.Immediate)
if (sidePanelViewStack.visible && welcomeViewStack.visible) {
if (sidePanelViewStack.visible && mainViewStack.visible) {
if (callStackViewShouldShow) {
welcomeViewStack.push(callStackView)
mainViewStack.push(callStackView)
} else {
welcomeViewStack.push(communicationPageMessageWebView)
mainViewStack.push(communicationPageMessageWebView)
}
} else if (sidePanelViewStack.visible
&& !welcomeViewStack.visible) {
&& !mainViewStack.visible) {
if (callStackViewShouldShow) {
sidePanelViewStack.push(callStackView)
} else {
sidePanelViewStack.push(communicationPageMessageWebView)
}
} else if (!sidePanelViewStack.visible
&& !welcomeViewStack.visible) {
&& !mainViewStack.visible) {
if (callStackViewShouldShow) {
sidePanelViewStack.push(callStackView)
} else {
@ -329,17 +492,18 @@ Window {
onAccountComboBoxNeedToShowWelcomePage: {
/*
* If the item argument is specified, all items down to (but not including) item will be popped.
*/
welcomeViewStack.pop(welcomePage)
welcomePage.currentAccountIndex = index
qrDialog.currentAccountIndex = index
if (!inSettingsView) {
mainViewStack.pop(welcomePage)
welcomePage.currentAccountIndex = index
qrDialog.currentAccountIndex = index
}
}
onConversationSmartListViewNeedToShowWelcomePage: {
welcomeViewStack.pop(welcomePage)
mainViewStack.pop(welcomePage)
welcomePage.currentAccountIndex = 0
qrDialog.currentAccountIndex = 0
}
@ -365,6 +529,7 @@ Window {
visible: false
objectName: "callStackViewObject"
}
WelcomePage {
@ -372,6 +537,30 @@ Window {
visible: false
}
SettingsView {
id: settingsView
visible: false
width: Math.max(mainViewStackPreferredWidth, mainViewStack.width - 100)
height: mainViewWindow.minimumHeight
onSettingsViewWindowNeedToShowMainViewWindow: {
mainViewWindowSidePanel.refreshAccountComboBox(
accountDeleted ? 0 : -1)
toggleSettingsView()
}
onSettingsViewWindowNeedToShowNewWizardWindow: {
mainViewWindow.noAccountIsAvailable()
}
onSettingsBackArrowClicked: {
mainViewStack.pop(StackView.Immediate)
recursionStackViewItemMove(sidePanelViewStack, mainViewStack, 2)
}
}
MessageWebView {
id: communicationPageMessageWebView
@ -394,28 +583,15 @@ Window {
onNeedToGoBackToWelcomeView: {
mainViewWindowSidePanel.deselectConversationSmartList()
if (communicationPageMessageWebView.visible
&& !welcomeViewStack.visible) {
&& !mainViewStack.visible) {
sidePanelViewStack.pop()
} else if (communicationPageMessageWebView.visible
&& welcomeViewStack.visible) {
welcomeViewStack.pop()
&& mainViewStack.visible) {
mainViewStack.pop()
}
}
Component.onCompleted: {
sidePanelViewStack.SplitView.maximumWidth = Qt.binding(function() {
return (hiddenView ? splitView.width : splitView.width - sidePanelViewStackPreferedWidth)
})
recordBox.x = Qt.binding(function() {
var i = (welcomeViewStack.width > 1000 ? Math.round((welcomeViewStack.width-1000)*0.5) : 0)
return sidePanelViewStack.width + recordBox.x_offset + i
})
recordBox.y = Qt.binding(function() {
return sidePanelViewStack.height + recordBox.y_offset
})
/*
* Set qml MessageWebView object pointer to c++.
@ -430,37 +606,37 @@ Window {
/*
* Hide unnecessary stackview when width is changed.
*/
if (mainViewWindow.width < sidePanelViewStackPreferedWidth
+ welcomePageGroupPreferedWidth - 5
&& welcomeViewStack.visible) {
welcomeViewStack.visible = false
hiddenView = true
if (mainViewWindow.width < sidePanelViewStackPreferredWidth
+ mainViewStackPreferredWidth - 5
&& mainViewStack.visible) {
mainViewStack.visible = false
sidePanelHidden = true
/*
* The find callback function is called for each item in the stack.
*/
var inWelcomeViewStack = welcomeViewStack.find(
var inWelcomeViewStack = mainViewStack.find(
function (item, index) {
return index > 0
})
if (inWelcomeViewStack) {
recursionStackViewItemMove(welcomeViewStack, sidePanelViewStack)
recursionStackViewItemMove(mainViewStack, sidePanelViewStack)
}
mainViewWindow.update()
} else if (mainViewWindow.width >= sidePanelViewStackPreferedWidth
+ welcomePageGroupPreferedWidth + 5
&& !welcomeViewStack.visible) {
welcomeViewStack.visible = true
hiddenView = false
} else if (mainViewWindow.width >= sidePanelViewStackPreferredWidth
+ mainViewStackPreferredWidth + 5
&& !mainViewStack.visible) {
mainViewStack.visible = true
sidePanelHidden = false
var inSidePanelViewStack = sidePanelViewStack.find(
function (item, index) {
return index > 0
})
if (inSidePanelViewStack) {
recursionStackViewItemMove(sidePanelViewStack, welcomeViewStack)
recursionStackViewItemMove(sidePanelViewStack, mainViewStack, (inSettingsView ? 2 : 1))
}
mainViewWindow.update()
@ -472,7 +648,7 @@ Window {
x: Math.round((mainViewWindow.width - width) / 2)
y: Math.round((mainViewWindow.height - height) / 2)
width: Math.max(mainViewWindow.width / 2, aboutPopUpPreferedWidth)
width: Math.max(mainViewWindow.width / 2, aboutPopUpPreferredWidth)
height: aboutPopUpDialog.contentHeight
}
@ -488,6 +664,17 @@ Window {
RecordBox{
id: recordBox
visible: false
Component.onCompleted: {
recordBox.x = Qt.binding(function() {
var i = (mainViewStack.width > 1000 ? Math.round((mainViewStack.width-1000)*0.5) : 0)
return sidePanelViewStack.width + recordBox.x_offset + i
})
recordBox.y = Qt.binding(function() {
return mainViewStack.height + recordBox.y_offset
})
}
}
UserProfile {
@ -495,7 +682,7 @@ Window {
x: Math.round((mainViewWindow.width - width) / 2)
y: Math.round((mainViewWindow.height - height) / 2)
width: Math.max(mainViewWindow.width / 2, aboutPopUpPreferedWidth)
width: Math.max(mainViewWindow.width / 2, aboutPopUpPreferredWidth)
height: userProfile.contentHeight
}

View file

@ -241,7 +241,8 @@ ComboBox {
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()

View file

@ -40,9 +40,9 @@ Popup {
*/
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

View file

@ -75,7 +75,7 @@ Rectangle {
handle: Rectangle {
implicitWidth: audioCallPageRect.width
implicitHeight: JamiTheme.splitViewHandlePreferedWidth
implicitHeight: JamiTheme.splitViewHandlePreferredWidth
color: SplitHandle.pressed ? JamiTheme.pressColor : (SplitHandle.hovered ? JamiTheme.hoverColor : JamiTheme.tabbarBorderColor)
}

View file

@ -37,7 +37,6 @@ Rectangle {
signal accountSignalsReconnect(string accountId)
signal needToUpdateConversationForAddedContact
signal needToAddNewAccount
signal settingBtnClicked_AccountComboBox
/*
@ -117,67 +116,16 @@ Rectangle {
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 @@ Rectangle {
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 @@ Rectangle {
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

View file

@ -157,7 +157,7 @@ Rectangle {
handle: Rectangle {
implicitWidth: videoCallPageRect.width
implicitHeight: JamiTheme.splitViewHandlePreferedWidth
implicitHeight: JamiTheme.splitViewHandlePreferredWidth
color: SplitHandle.pressed ? JamiTheme.pressColor : (SplitHandle.hovered ? JamiTheme.hoverColor : JamiTheme.tabbarBorderColor)
}

View file

@ -28,13 +28,14 @@ Rectangle {
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 {

View file

@ -29,6 +29,7 @@ import "components"
Rectangle {
id: settingsViewWindow
enum SettingsMenu{
Account,
General,
@ -144,9 +145,10 @@ Rectangle {
signal settingsViewWindowNeedToShowMainViewWindow(bool accountDeleted)
signal settingsViewWindowNeedToShowNewWizardWindow
property int textFontSize: 9
signal settingsBackArrowClicked
visible: true
anchors.fill: parent
Rectangle {
id: settingsViewRect
@ -161,130 +163,86 @@ Rectangle {
}
}
SplitView {
StackLayout {
anchors.fill: parent
orientation: Qt.Horizontal
handle: Rectangle {
implicitWidth: 3
implicitHeight: 3
color: JamiTheme.lightGrey_
}
id: rightSettingsWidget
Rectangle {
id: leftSettingsWidget
property int pageIdCurrentAccountSettingsScrollPage: 0
property int pageIdCurrentSIPAccountSettingScrollPage: 1
property int pageIdGeneralSettingsPage: 2
property int pageIdAvSettingPage: 3
property int pageIdPluginSettingsPage: 4
SplitView.minimumWidth: 200
SplitView.preferredWidth: 200
SplitView.maximumWidth: parent.width / 2
SplitView.fillHeight: true
LeftPanelView {
id: leftPanelView
contentViewportWidth: leftSettingsWidget.width
contentViewPortHeight: leftSettingsWidget.height
onBtnExitClicked:{
leaveSettingsSlot()
}
Connections {
target: leftPanelView.btnAccountSettings
function onCheckedToggledForRightPanel(checked) {
setSelected(SettingsView.Account)
currentIndex: {
switch(selectedMenu){
case SettingsView.Account:
if(settingsViewRect.isSIP){
return pageIdCurrentSIPAccountSettingScrollPage
} else {
return pageIdCurrentAccountSettingsScrollPage
}
}
Connections {
target: leftPanelView.btnGeneralSettings
function onCheckedToggledForRightPanel(checked) {
setSelected(SettingsView.General)
}
}
Connections {
target: leftPanelView.btnMediaSettings
function onCheckedToggledForRightPanel(checked) {
setSelected(SettingsView.Media)
}
}
Connections {
target: leftPanelView.btnPluginSettings
function onCheckedToggledForRightPanel(checked) {
setSelected(SettingsView.Plugin)
}
}
case SettingsView.General:
return pageIdGeneralSettingsPage
case SettingsView.Media:
return pageIdAvSettingPage
case SettingsView.Plugin:
return pageIdPluginSettingsPage
}
}
StackLayout {
id: rightSettingsWidget
// current account setting scroll page, index 0
CurrentAccountSettingsScrollPage {
id: currentAccountSettingsScrollWidget
property int pageIdCurrentAccountSettingsScrollPage: 0
property int pageIdCurrentSIPAccountSettingScrollPage: 1
property int pageIdGeneralSettingsPage: 2
property int pageIdAvSettingPage: 3
property int pageIdPluginSettingsPage: 4
currentIndex: {
switch(selectedMenu){
case SettingsView.Account:
if(settingsViewRect.isSIP){
return pageIdCurrentSIPAccountSettingScrollPage
} else {
return pageIdCurrentAccountSettingsScrollPage
}
case SettingsView.General:
return pageIdGeneralSettingsPage
case SettingsView.Media:
return pageIdAvSettingPage
case SettingsView.Plugin:
return pageIdPluginSettingsPage
}
onNavigateToMainView: {
leaveSettingsSlot(true)
}
SplitView.fillWidth: true
SplitView.fillHeight: true
onNavigateToNewWizardView: {
leaveSettingsSlot(true, false)
}
}
// current account setting scroll page, index 0
CurrentAccountSettingsScrollPage {
id: currentAccountSettingsScrollWidget
// current SIP account setting scroll page, index 1
CurrentSIPAccountSettingScrollPage {
id: currentSIPAccountSettingsScrollWidget
onNavigateToMainView:{
leaveSettingsSlot(true)
}
onNavigateToNewWizardView: {
leaveSettingsSlot(true, false)
}
onNavigateToMainView: {
leaveSettingsSlot(true)
}
// current SIP account setting scroll page, index 1
CurrentSIPAccountSettingScrollPage {
id: currentSIPAccountSettingsScrollWidget
onNavigateToMainView: {
leaveSettingsSlot(true)
}
onNavigateToNewWizardView: {
leaveSettingsSlot(true, false)
}
onNavigateToNewWizardView: {
leaveSettingsSlot(true, false)
}
}
// general setting page, index 2
GeneralSettingsPage {
id: generalSettings
}
// general setting page, index 2
GeneralSettingsPage {
id: generalSettings
}
// av setting page, index 3
AvSettingPage {
id: avSettings
}
// av setting page, index 3
AvSettingPage {
id: avSettings
}
// plugin setting page, index 4
PluginSettingsPage {
id: pluginSettings
}
// plugin setting page, index 4
PluginSettingsPage {
id: pluginSettings
}
}
}
/*
* Back button signal redirection
*/
Component.onCompleted: {
currentAccountSettingsScrollWidget.backArrowClicked.connect(settingsBackArrowClicked)
currentSIPAccountSettingsScrollWidget.backArrowClicked.connect(settingsBackArrowClicked)
generalSettings.backArrowClicked.connect(settingsBackArrowClicked)
avSettings.backArrowClicked.connect(settingsBackArrowClicked)
pluginSettings.backArrowClicked.connect(settingsBackArrowClicked)
}
}

View file

@ -24,6 +24,7 @@ import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.14
import QtQuick.Controls.Styles 1.4
import net.jami.Models 1.0
import "../../commoncomponents"
Rectangle {
id: avSettingPage
@ -216,6 +217,7 @@ Rectangle {
}
property bool previewAvailable: false
signal backArrowClicked
Connections{
target: ClientWrapper.avmodel
@ -267,18 +269,47 @@ Rectangle {
Layout.maximumHeight: 10
}
Label {
RowLayout {
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
Layout.leftMargin: 16
Layout.fillWidth: true
Layout.minimumHeight: 25
Layout.preferredHeight: 25
Layout.maximumHeight: 25
Layout.maximumHeight: 64
Layout.minimumHeight: 64
Layout.preferredHeight: 64
text: qsTr("Audio / Video")
font.pointSize: 15
font.kerning: true
HoverableButton {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
Layout.preferredWidth: 30
Layout.preferredHeight: 30
radius: 30
source: "qrc:/images/icons/ic_arrow_back_24px.svg"
backgroundColor: "white"
onExitColor: "white"
visible: mainViewWindow.sidePanelHidden
onClicked: {
backArrowClicked()
}
}
Label {
Layout.fillWidth: true
Layout.minimumHeight: 25
Layout.preferredHeight: 25
Layout.maximumHeight: 25
text: qsTr("Audio / Video")
font.pointSize: 15
font.kerning: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
}
Item {

View file

@ -48,6 +48,7 @@ Rectangle {
signal navigateToMainView
signal navigateToNewWizardView
signal backArrowClicked
function refreshRelevantUI(){
refreshVariable++
@ -479,6 +480,26 @@ Rectangle {
Layout.minimumWidth: 30
}
HoverableButton {
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
Layout.preferredWidth: 30
Layout.preferredHeight: 30
radius: 30
source: "qrc:/images/icons/ic_arrow_back_24px.svg"
backgroundColor: "white"
onExitColor: "white"
visible: mainViewWindow.sidePanelHidden
onClicked: {
backArrowClicked()
}
}
Label {
id: accountPageTitle

View file

@ -29,6 +29,7 @@ import "../../commoncomponents"
Rectangle {
signal navigateToMainView
signal navigateToNewWizardView
signal backArrowClicked
function updateAccountInfoDisplayed() {
displaySIPNameLineEdit.text = ClientWrapper.settingsAdaptor.getCurrentAccount_Profile_Info_Alias()
@ -124,6 +125,24 @@ Rectangle {
Layout.minimumWidth: 48
}
HoverableButton {
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
Layout.preferredWidth: 30
Layout.preferredHeight: 30
radius: 30
source: "qrc:/images/icons/ic_arrow_back_24px.svg"
backgroundColor: "white"
onExitColor: "white"
visible: mainViewWindow.sidePanelHidden
onClicked: {
backArrowClicked()
}
}
Label {
id: accountPageTitleSIP

View file

@ -74,7 +74,7 @@ Rectangle {
updateRecordQualityTimer.restart()
}
Timer{
Timer {
id: updateRecordQualityTimer
interval: 500
@ -148,6 +148,8 @@ Rectangle {
//property AVModel avmodel: ClientWrapper.accountAdaptor.avModel()
property string recordPath: ClientWrapper.settingsAdaptor.getDir_Document()
signal backArrowClicked
onDownloadPathChanged: {
if(downloadPath === "") return
ClientWrapper.settingsAdaptor.setDownloadPath(downloadPath)
@ -164,46 +166,74 @@ Rectangle {
Layout.fillHeight: true
Layout.fillWidth: true
ScrollView{
ScrollView {
anchors.fill: parent
clip: true
RowLayout {
width: generalSettingsRect.width
height: generalSettingsRect.height
ColumnLayout {
spacing: 8
spacing: 0
Layout.fillHeight: true
Layout.maximumWidth: 580
Layout.preferredWidth: 580
Layout.minimumWidth: 580
Item {
Layout.fillHeight: true
Layout.maximumWidth: 48
Layout.preferredWidth: 48
Layout.minimumWidth: 48
}
RowLayout {
ColumnLayout {
spacing: 6
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
Layout.leftMargin: 16
Layout.fillWidth: true
Layout.maximumHeight: 64
Layout.minimumHeight: 64
Layout.preferredHeight: 64
Layout.fillHeight: true
Layout.maximumWidth: 580
Layout.preferredWidth: 580
Layout.minimumWidth: 580
HoverableButton {
id: backToSettingsMenuButton
Item {
Layout.fillWidth: true
Layout.minimumHeight: 10
Layout.preferredHeight: 10
Layout.maximumHeight: 10
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
Layout.preferredWidth: 30
Layout.preferredHeight: 30
radius: 30
source: "qrc:/images/icons/ic_arrow_back_24px.svg"
backgroundColor: "white"
onExitColor: "white"
visible: mainViewWindow.sidePanelHidden
onClicked: {
backArrowClicked()
}
}
Label {
Layout.fillWidth: true
Layout.minimumHeight: 25
Layout.preferredHeight: 25
Layout.maximumHeight: 25
Layout.minimumHeight: 64
Layout.preferredHeight: 64
Layout.maximumHeight: 64
text: qsTr("General")
font.pointSize: 15
font.pointSize: JamiTheme.titleFontSize
font.kerning: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
}
// system setting panel
ColumnLayout {
spacing: 6
Layout.fillWidth: true
Label {
Layout.fillWidth: true
Layout.minimumHeight: 21
Layout.preferredHeight: 21
Layout.maximumHeight: 21
text: qsTr("System")
font.pointSize: 13
font.kerning: true
horizontalAlignment: Text.AlignLeft
@ -212,463 +242,431 @@ Rectangle {
Item {
Layout.fillWidth: true
Layout.minimumHeight: 24
Layout.preferredHeight: 24
Layout.maximumHeight: 24
Layout.minimumHeight: 10
Layout.preferredHeight: 10
Layout.maximumHeight: 10
}
// system setting panel
ColumnLayout {
spacing: 6
Layout.fillWidth: true
Label {
Layout.fillWidth: true
Layout.minimumHeight: 21
Layout.preferredHeight: 21
Layout.maximumHeight: 21
ToggleSwitch {
id: notificationCheckBox
text: qsTr("System")
font.pointSize: 13
font.kerning: true
Layout.leftMargin: 20
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
labelText: "Enable desktop notifications"
fontPointSize: 11
onSwitchToggled: {
slotSetNotifications(checked)
}
}
Item {
Layout.fillWidth: true
ToggleSwitch {
id: closeOrMinCheckBox
Layout.minimumHeight: 10
Layout.preferredHeight: 10
Layout.maximumHeight: 10
Layout.leftMargin: 20
labelText: "Keep minimize on close"
fontPointSize: 11
onSwitchToggled: {
slotSetClosedOrMin(checked)
}
}
ColumnLayout {
ToggleSwitch {
id: applicationOnStartUpCheckBox
Layout.leftMargin: 20
labelText: "Run on Startup"
fontPointSize: 11
onSwitchToggled: {
slotSetRunOnStartUp(checked)
}
}
RowLayout {
spacing: 6
Layout.leftMargin: 20
Layout.fillWidth: true
Layout.maximumHeight: 30
ToggleSwitch {
id: notificationCheckBox
Label {
Layout.fillHeight: true
Layout.leftMargin: 20
Layout.maximumWidth: 94
Layout.preferredWidth: 94
Layout.minimumWidth: 94
labelText: "Enable desktop notifications"
fontPointSize: 11
text: qsTr("Download folder")
font.pointSize: 10
font.kerning: true
onSwitchToggled: {
slotSetNotifications(checked)
}
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
ToggleSwitch {
id: closeOrMinCheckBox
Layout.leftMargin: 20
labelText: "Keep minimize on close"
fontPointSize: 11
onSwitchToggled: {
slotSetClosedOrMin(checked)
}
}
ToggleSwitch {
id: applicationOnStartUpCheckBox
Layout.leftMargin: 20
labelText: "Run on Startup"
fontPointSize: 11
onSwitchToggled: {
slotSetRunOnStartUp(checked)
}
}
RowLayout {
spacing: 6
Layout.leftMargin: 20
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
HoverableRadiusButton {
id: downloadButton
Layout.maximumWidth: 320
Layout.preferredWidth: 320
Layout.minimumWidth: 320
Layout.minimumHeight: 30
Layout.preferredHeight: 30
Layout.maximumHeight: 30
Label {
Layout.fillHeight: true
radius: height / 2
Layout.maximumWidth: 94
Layout.preferredWidth: 94
Layout.minimumWidth: 94
icon.source: "qrc:/images/icons/round-folder-24px.svg"
icon.height: 24
icon.width: 24
text: qsTr("Download folder")
font.pointSize: 10
font.kerning: true
text: downloadPath
fontPointSize: 10
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
HoverableRadiusButton {
id: downloadButton
Layout.maximumWidth: 320
Layout.preferredWidth: 320
Layout.minimumWidth: 320
Layout.minimumHeight: 30
Layout.preferredHeight: 30
Layout.maximumHeight: 30
radius: height / 2
icon.source: "qrc:/images/icons/round-folder-24px.svg"
icon.height: 24
icon.width: 24
text: downloadPath
fontPointSize: 10
onClicked: {
openDownloadFolderSlot()
}
onClicked: {
openDownloadFolderSlot()
}
}
}
}
Item {
Layout.fillWidth: true
Layout.minimumHeight: 20
Layout.preferredHeight: 20
Layout.maximumHeight: 20
}
// call recording setting panel
ColumnLayout {
spacing: 6
Layout.fillWidth: true
Label {
Layout.fillWidth: true
Layout.minimumHeight: 21
Layout.preferredHeight: 21
Layout.maximumHeight: 21
text: qsTr("Call Recording")
font.pointSize: 13
font.kerning: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
Item {
Layout.fillWidth: true
Layout.minimumHeight: 10
Layout.preferredHeight: 10
Layout.maximumHeight: 10
}
ColumnLayout {
spacing: 6
Layout.fillWidth: true
ToggleSwitch {
id: alwaysRecordingCheckBox
Layout.leftMargin: 20
labelText: "Always record calls"
fontPointSize: 11
onSwitchToggled: {
slotAlwaysRecordingClicked(checked)
}
}
ToggleSwitch {
id: recordPreviewCheckBox
Layout.leftMargin: 20
labelText: "Record preview video for a call"
fontPointSize: 11
onSwitchToggled: {
slotRecordPreviewClicked(checked)
}
}
RowLayout {
spacing: 6
Layout.leftMargin: 20
Layout.fillWidth: true
Layout.maximumHeight: 30
Label {
Layout.fillHeight: true
Layout.maximumWidth: 42
Layout.preferredWidth: 42
Layout.minimumWidth: 42
text: qsTr("Quality")
font.pointSize: 10
font.kerning: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
ColumnLayout {
spacing: 0
Layout.fillHeight: true
Layout.maximumWidth: recordQualityValueLabel.width
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
Label {
id: recordQualityValueLabel
Layout.minimumWidth: 40
Layout.minimumHeight: 16
Layout.preferredHeight: 16
Layout.maximumHeight: 16
text: qsTr("VALUE ")
font.pointSize: 10
font.kerning: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
}
Slider{
id: recordQualitySlider
Layout.fillHeight: true
Layout.maximumWidth: 320
Layout.preferredWidth: 320
Layout.minimumWidth: 320
from: 0
to: 500
stepSize: 1
onMoved: {
slotRecordQualitySliderValueChanged(value)
}
}
}
RowLayout {
spacing: 6
Layout.leftMargin: 20
Layout.fillWidth: true
Layout.maximumHeight: 30
Label {
Layout.fillHeight: true
Layout.maximumWidth: 42
Layout.preferredWidth: 42
Layout.minimumWidth: 42
text: qsTr("Save in")
font.pointSize: 10
font.kerning: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
HoverableRadiusButton {
id: recordPathButton
Layout.maximumWidth: 320
Layout.preferredWidth: 320
Layout.minimumWidth: 320
Layout.minimumHeight: 30
Layout.preferredHeight: 30
Layout.maximumHeight: 30
radius: height / 2
icon.source: "qrc:/images/icons/round-folder-24px.svg"
icon.height: 24
icon.width: 24
text: recordPath
fontPointSize: 10
onClicked: {
openRecordFolderSlot()
}
}
}
}
}
Item {
Layout.fillWidth: true
Layout.minimumHeight: 20
Layout.preferredHeight: 20
Layout.maximumHeight: 20
}
// update setting panel
ColumnLayout {
spacing: 6
Layout.fillWidth: true
visible: Qt.platform.os == "windows"? true : false
Label {
Layout.fillWidth: true
Layout.minimumHeight: 21
Layout.preferredHeight: 21
Layout.maximumHeight: 21
text: qsTr("Updates")
font.pointSize: 13
font.kerning: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
Item {
Layout.fillWidth: true
Layout.minimumHeight: 10
Layout.preferredHeight: 10
Layout.maximumHeight: 10
}
ColumnLayout {
spacing: 6
Layout.fillWidth: true
ToggleSwitch {
id: autoUpdateCheckBox
Layout.leftMargin: 20
labelText: "Check for updates automatically"
fontPointSize: 11
onSwitchToggled: {
slotSetUpdateAutomatic(checked)
}
}
RowLayout {
spacing: 6
Layout.leftMargin: 20
Layout.fillWidth: true
Layout.maximumHeight: 30
HoverableRadiusButton {
id: checkUpdateButton
Layout.maximumWidth: 275
Layout.preferredWidth: 275
Layout.minimumWidth: 275
Layout.minimumHeight: 30
Layout.preferredHeight: 30
Layout.maximumHeight: 30
radius: height / 2
text: "Check for updates now"
fontPointSize: 10
onClicked: {
checkForUpdateSlot()
}
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
}
RowLayout {
spacing: 6
Layout.leftMargin: 20
Layout.fillWidth: true
Layout.maximumHeight: 30
HoverableRadiusButton {
id: installBetaButton
Layout.maximumWidth: 275
Layout.preferredWidth: 275
Layout.minimumWidth: 275
Layout.minimumHeight: 30
Layout.preferredHeight: 30
Layout.maximumHeight: 30
radius: height / 2
text: "Install the latest beta version"
fontPointSize: 10
onClicked: {
installBetaSlot()
}
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
}
}
}
// spacer on the bottom
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
}
Item {
Layout.fillWidth: true
Layout.minimumHeight: 20
Layout.preferredHeight: 20
Layout.maximumHeight: 20
}
// call recording setting panel
ColumnLayout {
spacing: 6
Layout.fillWidth: true
Label {
Layout.fillWidth: true
Layout.minimumHeight: 21
Layout.preferredHeight: 21
Layout.maximumHeight: 21
text: qsTr("Call Recording")
font.pointSize: 13
font.kerning: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
Item {
Layout.fillWidth: true
Layout.minimumHeight: 10
Layout.preferredHeight: 10
Layout.maximumHeight: 10
}
ColumnLayout {
spacing: 6
Layout.fillWidth: true
ToggleSwitch {
id: alwaysRecordingCheckBox
Layout.leftMargin: 20
labelText: "Always record calls"
fontPointSize: 11
onSwitchToggled: {
slotAlwaysRecordingClicked(checked)
}
}
ToggleSwitch {
id: recordPreviewCheckBox
Layout.leftMargin: 20
labelText: "Record preview video for a call"
fontPointSize: 11
onSwitchToggled: {
slotRecordPreviewClicked(checked)
}
}
RowLayout {
spacing: 6
Layout.leftMargin: 20
Layout.fillWidth: true
Layout.maximumHeight: 30
Label {
Layout.fillHeight: true
Layout.maximumWidth: 42
Layout.preferredWidth: 42
Layout.minimumWidth: 42
text: qsTr("Quality")
font.pointSize: 10
font.kerning: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
ColumnLayout {
spacing: 0
Layout.fillHeight: true
Layout.maximumWidth: recordQualityValueLabel.width
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
Label {
id: recordQualityValueLabel
Layout.minimumWidth: 40
Layout.minimumHeight: 16
Layout.preferredHeight: 16
Layout.maximumHeight: 16
text: qsTr("VALUE ")
font.pointSize: 10
font.kerning: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
}
Slider {
id: recordQualitySlider
Layout.fillHeight: true
Layout.maximumWidth: 320
Layout.preferredWidth: 320
Layout.minimumWidth: 320
from: 0
to: 500
stepSize: 1
onMoved: {
slotRecordQualitySliderValueChanged(value)
}
}
}
RowLayout {
spacing: 6
Layout.leftMargin: 20
Layout.fillWidth: true
Layout.maximumHeight: 30
Label {
Layout.fillHeight: true
Layout.maximumWidth: 42
Layout.preferredWidth: 42
Layout.minimumWidth: 42
text: qsTr("Save in")
font.pointSize: 10
font.kerning: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
HoverableRadiusButton {
id: recordPathButton
Layout.maximumWidth: 320
Layout.preferredWidth: 320
Layout.minimumWidth: 320
Layout.minimumHeight: 30
Layout.preferredHeight: 30
Layout.maximumHeight: 30
radius: height / 2
icon.source: "qrc:/images/icons/round-folder-24px.svg"
icon.height: 24
icon.width: 24
text: recordPath
fontPointSize: 10
onClicked: {
openRecordFolderSlot()
}
}
}
}
}
Item {
Layout.fillWidth: true
Layout.minimumHeight: 20
Layout.preferredHeight: 20
Layout.maximumHeight: 20
}
// update setting panel
ColumnLayout {
spacing: 6
Layout.fillWidth: true
visible: Qt.platform.os == "windows"? true : false
Label {
Layout.fillWidth: true
Layout.minimumHeight: 21
Layout.preferredHeight: 21
Layout.maximumHeight: 21
text: qsTr("Updates")
font.pointSize: 13
font.kerning: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
Item {
Layout.fillWidth: true
Layout.minimumHeight: 10
Layout.preferredHeight: 10
Layout.maximumHeight: 10
}
ColumnLayout {
spacing: 6
Layout.fillWidth: true
ToggleSwitch {
id: autoUpdateCheckBox
Layout.leftMargin: 20
labelText: "Check for updates automatically"
fontPointSize: 11
onSwitchToggled: {
slotSetUpdateAutomatic(checked)
}
}
RowLayout {
spacing: 6
Layout.leftMargin: 20
Layout.fillWidth: true
Layout.maximumHeight: 30
HoverableRadiusButton {
id: checkUpdateButton
Layout.maximumWidth: 275
Layout.preferredWidth: 275
Layout.minimumWidth: 275
Layout.minimumHeight: 30
Layout.preferredHeight: 30
Layout.maximumHeight: 30
radius: height / 2
text: "Check for updates now"
fontPointSize: 10
onClicked: {
checkForUpdateSlot()
}
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
}
RowLayout {
spacing: 6
Layout.leftMargin: 20
Layout.fillWidth: true
Layout.maximumHeight: 30
HoverableRadiusButton {
id: installBetaButton
Layout.maximumWidth: 275
Layout.preferredWidth: 275
Layout.minimumWidth: 275
Layout.minimumHeight: 30
Layout.preferredHeight: 30
Layout.maximumHeight: 30
radius: height / 2
text: "Install the latest beta version"
fontPointSize: 10
onClicked: {
installBetaSlot()
}
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
}
}
}
// spacer on the bottom
Item {
Layout.fillHeight: true
Layout.fillWidth: true

View file

@ -23,11 +23,13 @@ import QtQuick.Controls 2.14
import QtQuick.Controls.Universal 2.12
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.14
import net.jami.Models 1.0
import "../../commoncomponents"
import "../../mainview/components"
ScrollView{
id: leftPanelView
Rectangle {
id: leftPanelRect
property int contentViewportWidth: 200
property int contentViewPortHeight: 768
@ -45,6 +47,7 @@ ScrollView{
anchors.fill: parent
clip: true
color: JamiTheme.backgroundColor
ColumnLayout {
spacing: 0
@ -52,83 +55,6 @@ ScrollView{
width: contentViewportWidth
height: contentViewPortHeight
Item {
Layout.fillWidth: true
Layout.maximumHeight: 13
Layout.preferredHeight: 13
Layout.minimumHeight: 13
}
RowLayout {
Layout.fillWidth: true
Layout.maximumHeight: 20
Layout.preferredHeight: 20
Layout.minimumHeight: 20
Layout.rightMargin: 14
Item {
Layout.fillHeight: true
Layout.maximumWidth: 20
Layout.preferredWidth: 20
Layout.minimumWidth: 20
}
Label {
Layout.maximumWidth: 57
Layout.preferredWidth: 57
Layout.minimumWidth: 57
Layout.maximumHeight: 30
Layout.preferredHeight: 30
Layout.minimumHeight: 30
text: qsTr("Settings")
font.pointSize: 12
font.kerning: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
Item {
Layout.fillWidth: true
Layout.fillHeight: true
}
HoverableRadiusButton {
id: btnExitSettings
Layout.maximumWidth: 30
Layout.preferredWidth: 30
Layout.minimumWidth: 30
Layout.maximumHeight: 30
Layout.preferredHeight: 30
Layout.minimumHeight: 30
buttonImageHeight: height
buttonImageWidth: height
backgroundColor: "transparent"
radius: height / 2
icon.source: "qrc:/images/icons/round-close-24px.svg"
icon.height: 24
icon.width: 24
onClicked: {
btnExitClicked()
}
}
}
Item {
Layout.fillWidth: true
Layout.maximumHeight: 13
Layout.preferredHeight: 13
Layout.minimumHeight: 13
}
IconButton {
id: accountSettingsButton
@ -186,6 +112,5 @@ ScrollView{
Layout.fillHeight: true
}
}
}

View file

@ -45,28 +45,56 @@ Rectangle {
Layout.fillHeight: true
Layout.fillWidth: true
signal backArrowClicked
ColumnLayout {
anchors.fill: parent
spacing: 6
width: parent.width
height: parent.height
Label {
width: parent.width
height: parent.height
Layout.leftMargin: 35
Layout.topMargin: 15
Layout.alignment: Qt.AlignTop
RowLayout {
text: qsTr("Plugin")
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
Layout.leftMargin: 16
Layout.fillWidth: true
Layout.maximumHeight: 64
Layout.minimumHeight: 64
Layout.preferredHeight: 64
font.pointSize: 15
font.kerning: true
HoverableButton {
horizontalAlignment: Text.AlignBottom
verticalAlignment: Text.AlignVCenter
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
Layout.preferredWidth: 30
Layout.preferredHeight: 30
radius: 30
source: "qrc:/images/icons/ic_arrow_back_24px.svg"
backgroundColor: "white"
onExitColor: "white"
visible: mainViewWindow.sidePanelHidden
onClicked: {
backArrowClicked()
}
}
Label {
Layout.fillWidth: true
Layout.minimumHeight: 25
Layout.preferredHeight: 25
Layout.maximumHeight: 25
text: qsTr("Plugin")
font.pointSize: 15
font.kerning: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
}
ScrollView {
@ -96,7 +124,7 @@ Rectangle {
onSwitchToggled: {
slotSetPluginEnabled(checked)
pluginListSettingsView.visible = checked
if (!checked) {
pluginListPreferencesView.visible = checked
@ -111,7 +139,7 @@ Rectangle {
Layout.fillHeight: true
width:380
height:100
// instantiate plugin list setting page
PluginListSettingsView {
id: pluginListSettingsView