Skip to content
Snippets Groups Projects
Commit acb1cf0c authored by Sébastien Blin's avatar Sébastien Blin Committed by Ming Rui Zhang
Browse files

settingsview: fix alignments and homogeneize items

Change-Id: I8ea60715a14b481da5c4d4d0078dc8de7df28eec
parent 2c9c452b
No related branches found
No related tags found
No related merge requests found
Showing
with 386 additions and 556 deletions
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M0 0h24v24H0V0z" fill="none"/><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"/></svg>
\ No newline at end of file
......@@ -35,7 +35,10 @@
<file>images/icons/ic_arrow_forward_white_48dp_2x.png</file>
<file>images/icons/ic_arrow_tab_next_black_9dp_2x.png</file>
<file>images/icons/ic_arrow_tab_previous_black_9dp_2x.png</file>
<file>images/icons/check_box-24px.svg</file>
<file>images/icons/check_box_outline_blank-24px.svg</file>
<file>images/icons/ic_block_24px.svg</file>
<file>images/icons/delete_forever-24px.svg</file>
<file>images/icons/phone_forwarded-24px.svg</file>
<file>images/icons/ic_chat_black_24dp_2x.png</file>
<file>images/icons/ic_chat_white_24dp.png</file>
......
......@@ -373,6 +373,16 @@ AccountAdapter::connectAccount(const QString &accountId)
QObject::disconnect(accountStatusChangedConnection_);
QObject::disconnect(contactAddedConnection_);
QObject::disconnect(accountProfileChangedConnection_);
QObject::disconnect(addedToConferenceConnection_);
accountProfileChangedConnection_
= QObject::connect(&LRCInstance::accountModel(),
&lrc::api::NewAccountModel::profileUpdated,
[this](const QString& accountId) {
if (LRCInstance::getCurrAccId() == accountId)
emit accountStatusChanged();
});
accountStatusChangedConnection_
= QObject::connect(accInfo.accountModel,
......@@ -401,7 +411,7 @@ AccountAdapter::connectAccount(const QString &accountId)
emit updateConversationForAddedContact();
}
});
QObject::disconnect(addedToConferenceConnection_);
addedToConferenceConnection_
= QObject::connect(accInfo.callModel.get(),
&NewCallModel::callAddedToConference,
......
......@@ -114,5 +114,6 @@ private:
QMetaObject::Connection accountStatusChangedConnection_;
QMetaObject::Connection contactAddedConnection_;
QMetaObject::Connection addedToConferenceConnection_;
QMetaObject::Connection accountProfileChangedConnection_;
};
Q_DECLARE_METATYPE(AccountAdapter *)
......@@ -19,8 +19,12 @@ TextField {
property int borderColorMode: InfoLineEdit.NORMAL
property var iconSource: {
if (readOnly) {
return ""
}
switch(borderColorMode){
case InfoLineEdit.RIGHT:
return "qrc:/images/icons/round-check_circle-24px.svg"
case InfoLineEdit.NORMAL:
return ""
case InfoLineEdit.ERROR:
......@@ -29,9 +33,12 @@ TextField {
}
property var backgroundColor: JamiTheme.rgb256(240,240,240)
property var borderColor: {
if (!enabled) {
return "transparent"
}
switch(borderColorMode){
case InfoLineEdit.NORMAL:
return "black"
return "#333"
case InfoLineEdit.RIGHT:
return "green"
case InfoLineEdit.ERROR:
......@@ -39,6 +46,8 @@ TextField {
}
}
signal imageClicked
Layout.minimumHeight: fieldLayoutHeight
Layout.preferredHeight: fieldLayoutHeight
Layout.maximumHeight: fieldLayoutHeight
......@@ -73,12 +82,23 @@ TextField {
color: borderColor
}
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.LeftButton
enabled: borderColorMode === InfoLineEdit.RIGHT
onReleased: {
imageClicked()
}
}
}
background: Rectangle {
anchors.fill: parent
radius: 4
border.color: readOnly? "black" : borderColor
border.color: readOnly? "transparent" : borderColor
color: readOnly? "transparent" : backgroundColor
}
}
......@@ -40,14 +40,27 @@ Dialog {
property string path: ""
property int purpose: PasswordDialog.ChangePassword
title: {
switch(purpose){
case PasswordDialog.ExportAccount:
return qsTr("Enter the password of this account")
case PasswordDialog.ChangePassword:
return qsTr("Changing password")
case PasswordDialog.SetPassword:
return qsTr("Set password")
header : Rectangle {
width: parent.width
height: 64
color: "transparent"
Text {
anchors.left: parent.left
anchors.leftMargin: 24
anchors.bottom: parent.bottom
anchors.bottomMargin: 24
text: {
switch(purpose){
case PasswordDialog.ExportAccount:
return qsTr("Enter the password of this account")
case PasswordDialog.ChangePassword:
return qsTr("Changing password")
case PasswordDialog.SetPassword:
return qsTr("Set password")
}
}
font.pointSize: JamiTheme.headerFontSize
}
}
......@@ -55,6 +68,8 @@ Dialog {
purpose = purposeIn
path = exportPathIn
currentPasswordEdit.clear()
passwordEdit.borderColorMode = InfoLineEdit.NORMAL
confirmPasswordEdit.borderColorMode = InfoLineEdit.NORMAL
passwordEdit.clear()
confirmPasswordEdit.clear()
passwordDialog.open()
......@@ -100,29 +115,23 @@ Dialog {
success = ClientWrapper.accountAdaptor.exportToFile(ClientWrapper.utilsAdaptor.getCurrAccId(),path,currentPasswordEdit.text)
}
spinnerMovie.playing = false
spinnerLabel.visible = false
if (success) {
haveDone(successCode, passwordDialog.purpose)
} else {
currentPasswordEdit.clear()
btnChangePasswordConfirm.enabled = false
wrongPasswordLabel.visible = true
currentPasswordEdit.borderColorMode = InfoLineEdit.ERROR
}
}
function savePasswordQML() {
var success = false
success = ClientWrapper.accountAdaptor.savePassword(ClientWrapper.utilsAdaptor.getCurrAccId(),currentPasswordEdit.text, passwordEdit.text)
spinnerMovie.playing = false
spinnerLabel.visible = false
if (success) {
ClientWrapper.accountAdaptor.setArchiveHasPassword(passwordEdit.text.length !== 0)
haveDone(successCode, passwordDialog.purpose)
} else {
currentPasswordEdit.clear()
currentPasswordEdit.borderColorMode = InfoLineEdit.ERROR
btnChangePasswordConfirm.enabled = false
wrongPasswordLabel.visible = true
}
}
......@@ -131,24 +140,20 @@ Dialog {
anchors.centerIn: parent.Center
x: (parent.width - width) / 2
y: (parent.height - height) / 2
height: contentLayout.implicitHeight + 64 + 16
contentItem: Rectangle{
implicitWidth: 440
implicitHeight: 270
contentItem: Rectangle {
implicitWidth: 280
ColumnLayout {
id: contentLayout
anchors.fill: parent
spacing: 7
spacing: 8
ColumnLayout {
Layout.topMargin: 11
Layout.leftMargin: 40
Layout.rightMargin: 40
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
Layout.preferredWidth: 360
Layout.maximumWidth: 360
spacing: 7
ColumnLayout {
......@@ -156,21 +161,16 @@ Dialog {
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: 356
Layout.maximumWidth: 356
InfoLineEdit {
MaterialLineEdit {
id: currentPasswordEdit
Layout.minimumHeight: 30
Layout.preferredHeight: 30
Layout.maximumHeight: 30
Layout.maximumHeight: visible ?
48 :
0
Layout.fillWidth: true
visible: purpose === PasswordDialog.ChangePassword || purpose === PasswordDialog.ExportAccount
echoMode: TextInput.Password
font.pointSize: 10
font.kerning: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
......@@ -184,32 +184,10 @@ Dialog {
if (currentPasswordEdit.text.length == 0) {
btnChangePasswordConfirm.enabled = false
} else {
wrongPasswordLabel.visible = false
btnChangePasswordConfirm.enabled = true
}
}
}
Label {
id: wrongPasswordLabel
Layout.alignment: Qt.AlignHCenter
Layout.minimumHeight: 12
Layout.preferredHeight: 12
Layout.maximumHeight: 12
Layout.fillWidth: true
font.pointSize: 8
font.kerning: true
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: qsTr("Current Password Incorrect")
color: "red"
visible: false
}
}
Item {
......@@ -220,16 +198,14 @@ Dialog {
Layout.maximumHeight: 8
}
InfoLineEdit {
MaterialLineEdit {
id: passwordEdit
fieldLayoutHeight: 30
fieldLayoutHeight: 48
layoutFillwidth: true
visible: purpose === PasswordDialog.ChangePassword || purpose === PasswordDialog.SetPassword
echoMode: TextInput.Password
font.pointSize: 10
font.kerning: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
......@@ -248,16 +224,14 @@ Dialog {
Layout.maximumHeight: 8
}
InfoLineEdit {
MaterialLineEdit {
id: confirmPasswordEdit
fieldLayoutHeight: 30
fieldLayoutHeight: 48
layoutFillwidth: true
visible: purpose === PasswordDialog.ChangePassword || purpose === PasswordDialog.SetPassword
echoMode: TextInput.Password
font.pointSize: 10
font.kerning: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
......@@ -269,98 +243,42 @@ Dialog {
}
}
Label {
id: spinnerLabel
visible: false
Layout.fillWidth: true
Layout.minimumHeight: 20
Layout.preferredHeight: 20
Layout.maximumHeight: 20
background: Rectangle {
anchors.fill: parent
AnimatedImage {
id: spinnerMovie
anchors.fill: parent
source: "qrc:/images/ajax-loader.gif"
playing: spinnerLabel.visible
paused: false
fillMode: Image.PreserveAspectFit
mipmap: true
}
}
}
RowLayout {
spacing: 7
spacing: 8
Layout.bottomMargin: 11
Layout.fillWidth: true
Layout.leftMargin: 30
Layout.rightMargin: 30
HoverableRadiusButton {
id: btnChangePasswordConfirm
Layout.maximumWidth: 130
Layout.preferredWidth: 130
Layout.minimumWidth: 130
Layout.alignment: Qt.AlignRight
Layout.minimumHeight: 30
Layout.preferredHeight: 30
Layout.maximumHeight: 30
Button {
id: btnChangePasswordConfirm
text: qsTr("Confirm")
font.pointSize: 10
font.kerning: true
radius: height / 2
contentItem: Text {
text: qsTr("CONFIRM")
color: JamiTheme.buttonTintedBlue
}
enabled: false
background: Rectangle {
color: "transparent"
}
onClicked: {
spinnerLabel.visible = true
spinnerMovie.playing = true
timerToOperate.restart()
}
}
Item {
Layout.fillWidth: true
Layout.fillHeight: true
}
HoverableButtonTextItem {
Button {
id: btnChangePasswordCancel
Layout.maximumWidth: 130
Layout.preferredWidth: 130
Layout.minimumWidth: 130
Layout.minimumHeight: 30
Layout.preferredHeight: 30
Layout.maximumHeight: 30
backgroundColor: "red"
onEnterColor: Qt.rgba(150 / 256, 0, 0, 0.7)
onDisabledBackgroundColor: Qt.rgba(
255 / 256,
0, 0, 0.8)
onPressColor: backgroundColor
textColor: "white"
text: qsTr("Cancel")
font.pointSize: 10
font.kerning: true
contentItem: Text {
text: qsTr("CANCEL")
color: JamiTheme.buttonTintedBlue
}
radius: height / 2
background: Rectangle {
color: "transparent"
}
onClicked: {
passwordDialog.reject()
......
......@@ -39,6 +39,7 @@ Item {
property string transparentColor: "transparent"
property string presenceGreen: "#4cd964"
property string notificationRed: "#ff3b30"
property string unPresenceOrange: "orange"
property string backgroundColor: lightGrey_
property string backgroundDarkColor: lightGreyTab_
......@@ -60,6 +61,12 @@ Item {
property string buttonTintedGreyHovered: "#777"
property string buttonTintedGreyPressed: "#777"
property string buttonTintedGreyInactive: "#bbb"
property string buttonTintedBlack: "#333"
property string buttonTintedBlackHovered: "#111"
property string buttonTintedBlackPressed: "#000"
property string buttonTintedRed: "red"
property string buttonTintedRedHovered: "#c00"
property string buttonTintedRedPressed: "#b00"
property string selectionBlue: "#109ede"
property string selectionGreen: "#21be2b"
......@@ -91,7 +98,7 @@ Item {
property int menuFontSize: 12
property int maximumWidthSettingsView: 800
property int preferredButtonWidth: 200
property int preferredFieldWidth: 216
property int preferredFieldHeight: 32
property int preferredMarginSize: 16
......
......@@ -219,7 +219,7 @@ Window {
callStackView.responsibleConvUid = convUid
callStackView.updateCorrspondingUI()
mainViewWindowSidePanel.needToChangeToAccount(accountId, index)
mainViewWindowSidePanel.refreshAccountComboBox(index)
ConversationsAdapter.selectConversation(accountId, convUid)
MessagesAdapter.setupChatView(convUid)
......@@ -549,8 +549,7 @@ Window {
height: mainViewWindow.minimumHeight
onSettingsViewWindowNeedToShowMainViewWindow: {
mainViewWindowSidePanel.refreshAccountComboBox(
accountDeleted ? 0 : -1)
mainViewWindowSidePanel.refreshAccountComboBox(0)
toggleSettingsView()
}
......
......@@ -31,8 +31,6 @@ ComboBox {
signal newAccountButtonClicked
signal settingBtnClicked
currentIndex: 0
function backToWelcomePage() {
needToBackToWelcomePage()
}
......@@ -42,6 +40,19 @@ ComboBox {
accountListModel.reset()
}
Connections {
target: accountListModel
function onModelReset() {
userImageRoot.source = "data:image/png;base64," + accountListModel.data(
accountListModel.index(0, 0), 259)
currentAccountPresenseCycle.accountStatus =
accountListModel.data(accountListModel.index(0, 0), 261)
textMetricsUserAliasRoot.text = accountListModel.data(accountListModel.index(0,0), 257)
textMetricsUsernameRoot.text = accountListModel.data(accountListModel.index(0,0), 258)
}
}
Image {
id: userImageRoot
......@@ -55,14 +66,8 @@ ComboBox {
fillMode: Image.PreserveAspectFit
// Base 64 format
source: {
if (currentIndex !== -1)
return "data:image/png;base64," + accountListModel.data(
accountListModel.index(
accountComboBox.currentIndex, 0), 259)
else
return source
}
source: "data:image/png;base64," + accountListModel.data(
accountListModel.index(0, 0), 259)
mipmap: true
AccountPresenceCycle {
......@@ -73,16 +78,7 @@ ComboBox {
anchors.bottom: userImageRoot.bottom
anchors.bottomMargin: -2
// Visible when account is registered.
visible: {
if (currentIndex !== -1)
return accountListModel.data(
accountListModel.index(
accountComboBox.currentIndex, 0), 261)
=== Account.Status.REGISTERED
else
return visible
}
accountStatus: accountListModel.data(accountListModel.index(0, 0), 261)
}
}
......@@ -133,14 +129,7 @@ ComboBox {
- arrowDropDown.width - qrCodeGenerateButton.width - 55
// Role::Alias
text: {
if (currentIndex !== -1)
return accountListModel.data(accountListModel.index(
accountComboBox.currentIndex,
0), 257)
else
return text
}
text: accountListModel.data(accountListModel.index(0,0), 257)
}
TextMetrics {
......@@ -154,14 +143,7 @@ ComboBox {
// Role::Username
text: {
if (currentIndex !== -1)
return accountListModel.data(accountListModel.index(
accountComboBox.currentIndex,
0), 258)
else
return text
}
text: accountListModel.data(accountListModel.index(0,0), 258)
}
HoverableButton {
......
......@@ -89,12 +89,7 @@ Popup {
anchors.bottom: userImage.bottom
anchors.bottomMargin: -2
// Visible when account is registered.
visible: {
return accountListModel.data(
accountListModel.index(index, 0), 261)
=== Account.Status.REGISTERED
}
accountStatus: Status
}
}
......
......@@ -23,6 +23,8 @@ import net.jami.Models 1.0
Rectangle {
id: root
property int accountStatus: 5
width: 12
height: 12
......@@ -35,7 +37,13 @@ Rectangle {
height: 10
radius: 30
color: JamiTheme.presenceGreen
color: {
if (accountStatus === Account.Status.REGISTERED)
return JamiTheme.presenceGreen
else if (accountStatus === Account.Status.TRYING)
return JamiTheme.unPresenceOrange
return JamiTheme.notificationRed
}
}
radius: 30
......
......@@ -77,30 +77,9 @@ Rectangle {
sidePanelTabBar.invitationTabDown = false
}
function needToChangeToAccount(accountId, index) {
if (index !== -1) {
accountComboBox.currentIndex = index
ClientWrapper.accountAdaptor.accountChanged(index)
accountChangedUIReset()
}
}
function refreshAccountComboBox(index) {
ClientWrapper.accountAdaptor.accountChanged(index)
function refreshAccountComboBox(index = -1) {
/*
* To make sure that the ui is refreshed for accountComboBox.
* Note: when index in -1, it means to maintain the
* current account selection.
*/
var currentIndex = accountComboBox.currentIndex
if (accountComboBox.currentIndex === index)
accountComboBox.currentIndex = -1
accountComboBox.currentIndex = index
if (index !== -1)
ClientWrapper.accountAdaptor.accountChanged(index)
else
accountComboBox.currentIndex = currentIndex
accountComboBox.update()
accountChangedUIReset()
accountComboBox.resetAccountListModel()
......
......@@ -109,7 +109,7 @@ Rectangle {
}
// slots
function leaveSettingsSlot(accountDeleted = false, showMainView = true){
function leaveSettingsSlot(showMainView){
avSettings.stopAudioMeter()
avSettings.stopPreviewing()
if(!settingsViewRect.isSIP){
......@@ -118,7 +118,7 @@ Rectangle {
currentSIPAccountSettingsScrollWidget.stopBooth()
}
if (showMainView)
settingsViewWindowNeedToShowMainViewWindow(accountDeleted)
settingsViewWindowNeedToShowMainViewWindow()
else
settingsViewWindowNeedToShowNewWizardWindow()
}
......@@ -142,7 +142,7 @@ Rectangle {
/*
* signal to redirect the page to main view
*/
signal settingsViewWindowNeedToShowMainViewWindow(bool accountDeleted)
signal settingsViewWindowNeedToShowMainViewWindow()
signal settingsViewWindowNeedToShowNewWizardWindow
signal settingsBackArrowClicked
......@@ -200,7 +200,7 @@ Rectangle {
}
onNavigateToNewWizardView: {
leaveSettingsSlot(true, false)
leaveSettingsSlot(false)
}
}
......@@ -213,7 +213,7 @@ Rectangle {
}
onNavigateToNewWizardView: {
leaveSettingsSlot(true, false)
leaveSettingsSlot(false)
}
}
......
......@@ -414,7 +414,7 @@ ColumnLayout {
fontSize: JamiTheme.settingsFontSize
}
HoverableRadiusButton {
MaterialButton {
id: btnRingtoneSIP
Layout.minimumWidth: preferredColumnWidth
......@@ -425,11 +425,10 @@ ColumnLayout {
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
radius: height / 2
icon.source: "qrc:/images/icons/round-folder-24px.svg"
icon.width: 16
icon.height: 16
source: "qrc:/images/icons/round-folder-24px.svg"
color: JamiTheme.buttonTintedGrey
hoveredColor: JamiTheme.buttonTintedGreyHovered
pressedColor: JamiTheme.buttonTintedGreyPressed
onClicked: {
ringtonePath_Dialog_SIP.open()
......@@ -477,11 +476,12 @@ ColumnLayout {
Layout.fillWidth: true
}
InfoLineEdit {
MaterialLineEdit {
id: lineEditVoiceMailDialCode
fieldLayoutWidth: preferredColumnWidth
fieldLayoutHeight: JamiTheme.preferredFieldHeight
padding: 8
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
......@@ -615,7 +615,7 @@ ColumnLayout {
maxWidth: preferredColumnWidth
}
HoverableRadiusButton {
MaterialButton {
id: btnSIPCACert
Layout.minimumWidth: preferredColumnWidth
......@@ -625,11 +625,10 @@ ColumnLayout {
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
radius: height / 2
icon.source: "qrc:/images/icons/round-folder-24px.svg"
icon.width: 16
icon.height: 16
source: "qrc:/images/icons/round-folder-24px.svg"
color: JamiTheme.buttonTintedGrey
hoveredColor: JamiTheme.buttonTintedGreyHovered
pressedColor: JamiTheme.buttonTintedGreyPressed
onClicked: {
caCert_Dialog_SIP.open()
......@@ -648,7 +647,7 @@ ColumnLayout {
maxWidth: preferredColumnWidth
}
HoverableRadiusButton {
MaterialButton {
id: btnSIPUserCert
Layout.minimumWidth: preferredColumnWidth
......@@ -659,11 +658,10 @@ ColumnLayout {
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
radius: height / 2
icon.source: "qrc:/images/icons/round-folder-24px.svg"
icon.width: 16
icon.height: 16
source: "qrc:/images/icons/round-folder-24px.svg"
color: JamiTheme.buttonTintedGrey
hoveredColor: JamiTheme.buttonTintedGreyHovered
pressedColor: JamiTheme.buttonTintedGreyPressed
onClicked: {
userCert_Dialog_SIP.open()
......@@ -682,7 +680,7 @@ ColumnLayout {
maxWidth: preferredColumnWidth
}
HoverableRadiusButton {
MaterialButton {
id: btnSIPPrivateKey
Layout.minimumWidth: preferredColumnWidth
......@@ -693,11 +691,10 @@ ColumnLayout {
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
radius: height / 2
icon.source: "qrc:/images/icons/round-folder-24px.svg"
icon.width: 16
icon.height: 16
source: "qrc:/images/icons/round-folder-24px.svg"
color: JamiTheme.buttonTintedGrey
hoveredColor: JamiTheme.buttonTintedGreyHovered
pressedColor: JamiTheme.buttonTintedGreyPressed
onClicked: {
privateKey_Dialog_SIP.open()
......@@ -718,11 +715,12 @@ ColumnLayout {
}
InfoLineEdit {
MaterialLineEdit {
id: lineEditSIPCertPassword
fieldLayoutWidth: preferredColumnWidth
fieldLayoutHeight: JamiTheme.preferredFieldHeight
padding: 8
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
......@@ -851,11 +849,12 @@ ColumnLayout {
maxWidth: preferredColumnWidth
}
InfoLineEdit {
MaterialLineEdit {
id: outgoingTLSServerNameLineEdit
fieldLayoutWidth: preferredColumnWidth
fieldLayoutHeight: JamiTheme.preferredFieldHeight
padding: 8
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
......@@ -1056,11 +1055,12 @@ ColumnLayout {
maxWidth: preferredColumnWidth
}
InfoLineEdit {
MaterialLineEdit {
id: lineEditTurnAddressSIP
fieldLayoutWidth: preferredColumnWidth
fieldLayoutHeight: JamiTheme.preferredFieldHeight
padding: 8
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
......@@ -1085,11 +1085,12 @@ ColumnLayout {
maxWidth: preferredColumnWidth
}
InfoLineEdit {
MaterialLineEdit {
id: lineEditTurnUsernameSIP
fieldLayoutWidth: preferredColumnWidth
fieldLayoutHeight: JamiTheme.preferredFieldHeight
padding: 8
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
......@@ -1113,11 +1114,12 @@ ColumnLayout {
maxWidth: preferredColumnWidth
}
InfoLineEdit {
MaterialLineEdit {
id: lineEditTurnPsswdSIP
fieldLayoutWidth: preferredColumnWidth
fieldLayoutHeight: JamiTheme.preferredFieldHeight
padding: 8
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
......@@ -1144,11 +1146,12 @@ ColumnLayout {
maxWidth: preferredColumnWidth
}
InfoLineEdit {
MaterialLineEdit {
id: lineEditTurnRealmSIP
fieldLayoutWidth: preferredColumnWidth
fieldLayoutHeight: JamiTheme.preferredFieldHeight
padding: 8
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
......@@ -1188,11 +1191,12 @@ ColumnLayout {
maxWidth: preferredColumnWidth
}
InfoLineEdit {
MaterialLineEdit {
id: lineEditSTUNAddressSIP
fieldLayoutWidth: preferredColumnWidth
fieldLayoutHeight: JamiTheme.preferredFieldHeight
padding: 8
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
......@@ -1271,11 +1275,12 @@ ColumnLayout {
maxWidth: preferredColumnWidth
}
InfoLineEdit {
MaterialLineEdit {
id: lineEditSIPCustomAddress
fieldLayoutWidth: preferredColumnWidth
fieldLayoutHeight: JamiTheme.preferredFieldHeight
padding: 8
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
......
......@@ -362,7 +362,7 @@ ColumnLayout {
fontSize: JamiTheme.settingsFontSize
}
HoverableRadiusButton {
MaterialButton {
id: btnRingtone
Layout.minimumWidth: preferredColumnWidth
......@@ -372,11 +372,10 @@ ColumnLayout {
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
radius: height / 2
icon.source: "qrc:/images/icons/round-folder-24px.svg"
icon.width: 16
icon.height: 16
source: "qrc:/images/icons/round-folder-24px.svg"
color: JamiTheme.buttonTintedGrey
hoveredColor: JamiTheme.buttonTintedGreyHovered
pressedColor: JamiTheme.buttonTintedGreyPressed
onClicked: {
ringtonePath_Dialog.open()
......@@ -433,11 +432,12 @@ ColumnLayout {
Layout.fillWidth: true
}
InfoLineEdit {
MaterialLineEdit {
id: lineEditNameServer
fieldLayoutWidth: preferredColumnWidth
fieldLayoutHeight: JamiTheme.preferredFieldHeight
padding: 8
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
......@@ -497,11 +497,12 @@ ColumnLayout {
maxWidth: preferredColumnWidth
}
InfoLineEdit {
MaterialLineEdit {
id: lineEditProxy
fieldLayoutWidth: preferredColumnWidth
fieldLayoutHeight: JamiTheme.preferredFieldHeight
padding: 8
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
......@@ -534,11 +535,12 @@ ColumnLayout {
Layout.fillWidth: true
}
InfoLineEdit {
MaterialLineEdit {
id: lineEditBootstrap
fieldLayoutWidth: preferredColumnWidth
fieldLayoutHeight: JamiTheme.preferredFieldHeight
padding: 8
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
......@@ -593,7 +595,7 @@ ColumnLayout {
maxWidth: preferredColumnWidth
}
HoverableRadiusButton {
MaterialButton {
id: btnCACert
Layout.minimumWidth: preferredColumnWidth
......@@ -604,11 +606,10 @@ ColumnLayout {
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
radius: height / 2
icon.source: "qrc:/images/icons/round-folder-24px.svg"
icon.width: 16
icon.height: 16
source: "qrc:/images/icons/round-folder-24px.svg"
color: JamiTheme.buttonTintedGrey
hoveredColor: JamiTheme.buttonTintedGreyHovered
pressedColor: JamiTheme.buttonTintedGreyPressed
onClicked: {
caCert_Dialog.open()
......@@ -627,7 +628,7 @@ ColumnLayout {
maxWidth: preferredColumnWidth
}
HoverableRadiusButton {
MaterialButton {
id: btnUserCert
Layout.minimumWidth: preferredColumnWidth
......@@ -638,11 +639,10 @@ ColumnLayout {
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
radius: height / 2
icon.source: "qrc:/images/icons/round-folder-24px.svg"
icon.width: 16
icon.height: 16
source: "qrc:/images/icons/round-folder-24px.svg"
color: JamiTheme.buttonTintedGrey
hoveredColor: JamiTheme.buttonTintedGreyHovered
pressedColor: JamiTheme.buttonTintedGreyPressed
onClicked: {
userCert_Dialog.open()
......@@ -661,13 +661,9 @@ ColumnLayout {
maxWidth: preferredColumnWidth
}
HoverableRadiusButton {
MaterialButton {
id: btnPrivateKey
radius: height / 2
Layout.minimumWidth: preferredColumnWidth
Layout.preferredWidth: preferredColumnWidth
Layout.maximumWidth: preferredColumnWidth
......@@ -676,9 +672,10 @@ ColumnLayout {
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
icon.source: "qrc:/images/icons/round-folder-24px.svg"
icon.width: 16
icon.height: 16
source: "qrc:/images/icons/round-folder-24px.svg"
color: JamiTheme.buttonTintedGrey
hoveredColor: JamiTheme.buttonTintedGreyHovered
pressedColor: JamiTheme.buttonTintedGreyPressed
onClicked: {
privateKey_Dialog.open()
......@@ -698,11 +695,12 @@ ColumnLayout {
}
InfoLineEdit {
MaterialLineEdit {
id: lineEditCertPassword
fieldLayoutWidth: preferredColumnWidth
fieldLayoutHeight: JamiTheme.preferredFieldHeight
padding: 8
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
......@@ -797,10 +795,11 @@ ColumnLayout {
maxWidth: preferredColumnWidth
}
InfoLineEdit {
MaterialLineEdit {
id: lineEditTurnAddress
fieldLayoutWidth: preferredColumnWidth
fieldLayoutHeight: JamiTheme.preferredFieldHeight
padding: 8
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
......@@ -829,11 +828,12 @@ ColumnLayout {
maxWidth: preferredColumnWidth
}
InfoLineEdit {
MaterialLineEdit {
id: lineEditTurnUsername
fieldLayoutWidth: preferredColumnWidth
fieldLayoutHeight: JamiTheme.preferredFieldHeight
padding: 8
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
......@@ -861,12 +861,13 @@ ColumnLayout {
maxWidth: preferredColumnWidth
}
InfoLineEdit {
MaterialLineEdit {
id: lineEditTurnPassword
layer.mipmap: false
fieldLayoutWidth: preferredColumnWidth
fieldLayoutHeight: JamiTheme.preferredFieldHeight
padding: 8
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
......@@ -913,11 +914,12 @@ ColumnLayout {
maxWidth: preferredColumnWidth
}
InfoLineEdit {
MaterialLineEdit {
id: lineEditSTUNAddress
fieldLayoutWidth: preferredColumnWidth
fieldLayoutHeight: JamiTheme.preferredFieldHeight
padding: 8
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
......
......@@ -35,7 +35,7 @@ ItemDelegate {
signal audioCodecStateChange(string idToSet , bool isToBeEnabled)
property int checkBoxWidth: 10
property int checkBoxWidth: 24
highlighted: ListView.isCurrentItem
......@@ -60,13 +60,15 @@ ItemDelegate {
tristate: false
checkState: isEnabled ? Qt.Checked : Qt.Unchecked
indicator.implicitWidth: checkBoxWidth
indicator.implicitHeight:checkBoxWidth
indicator.layer.textureSize.width: checkBoxWidth
indicator.layer.textureSize.height: checkBoxWidth
text: ""
indicator: Image {
anchors.centerIn: parent
width: checkBoxWidth
height: checkBoxWidth
source: checkBoxIsEnabled.checked ?
"qrc:/images/icons/check_box-24px.svg" :
"qrc:/images/icons/check_box_outline_blank-24px.svg"
}
nextCheckState: function() {
var result
......
......@@ -56,26 +56,6 @@ Rectangle {
refreshVariable--
}
Connections {
id: btnRegisterNameClickConnection
target: btnRegisterName
enabled: {
refreshVariable
switch (regNameUi) {
case CurrentAccountSettingsScrollPage.FREE:
return true
default:
return false
}
}
function onClicked() {
slotRegisterName()
}
}
function updateAccountInfoDisplayed() {
setAvatar()
......@@ -529,6 +509,7 @@ Rectangle {
ToggleSwitch {
id: accountEnableCheckBox
Layout.fillWidth: true
Layout.topMargin: JamiTheme.preferredMarginSize
Layout.leftMargin: JamiTheme.preferredMarginSize
......@@ -546,7 +527,6 @@ Rectangle {
ColumnLayout {
Layout.fillWidth: true
Layout.fillHeight: true
Layout.leftMargin: JamiTheme.preferredMarginSize
spacing: 8
Label {
......@@ -555,6 +535,7 @@ Rectangle {
Layout.maximumHeight: JamiTheme.preferredFieldHeight
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.minimumHeight: JamiTheme.preferredFieldHeight
Layout.leftMargin: JamiTheme.preferredMarginSize
text: qsTr("Profile")
font.pointSize: JamiTheme.headerFontSize
......@@ -588,10 +569,10 @@ Rectangle {
}
}
InfoLineEdit {
MaterialLineEdit {
id: displayNameLineEdit
Layout.maximumWidth: JamiTheme.preferredButtonWidth
Layout.maximumWidth: JamiTheme.preferredFieldWidth
Layout.minimumHeight: JamiTheme.preferredFieldHeight
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
......@@ -603,6 +584,7 @@ Rectangle {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
padding: 8
onEditingFinished: {
ClientWrapper.accountAdaptor.setCurrAccDisplayName(
......@@ -688,7 +670,7 @@ Rectangle {
id: currentRingIDText
elide: Text.ElideRight
elideWidth: accountViewRect.width - idLabel.width -JamiTheme.preferredMarginSize*3
elideWidth: accountViewRect.width - idLabel.width -JamiTheme.preferredMarginSize*4
text: { refreshVariable
return ClientWrapper.settingsAdaptor.getCurrentAccount_Profile_Info_Uri()
......@@ -714,10 +696,10 @@ Rectangle {
eText: qsTr("Registered name")
fontSize: JamiTheme.settingsFontSize
maxWidth: 160
maxWidth: preferredColumnWidth
}
TextField {
MaterialLineEdit {
id: currentRegisteredID
Layout.minimumWidth: preferredColumnWidth
Layout.preferredWidth: preferredColumnWidth
......@@ -727,7 +709,8 @@ Rectangle {
Layout.maximumHeight: JamiTheme.preferredFieldHeight
placeholderText: { refreshVariable
var result = registeredIdNeedsSet ? qsTr("Type here to register a username") : ""
var result = registeredIdNeedsSet ?
qsTr("Type here to register a username") : ""
return result}
text: {
......@@ -747,121 +730,37 @@ Rectangle {
font.bold: { refreshVariable
return !registeredIdNeedsSet}
horizontalAlignment: Text.AlignLeft
horizontalAlignment: registeredIdNeedsSet ?
Text.AlignLeft :
Text.AlignRight
verticalAlignment: Text.AlignVCenter
padding: 8
background: Rectangle {
anchors.fill: parent
radius: {refreshVariable
var result = registeredIdNeedsSet ? height / 2 : 0
return result}
border.color: "transparent"
border.width: {refreshVariable
var result = registeredIdNeedsSet ? 2 : 0
return result}
color: {refreshVariable
var result = registeredIdNeedsSet ? Qt.rgba(
240 / 256, 240 / 256,
240 / 256,
1.0) : "transparent"
return result}
}
onTextEdited: {
verifyRegisteredNameSlot()
}
onEditingFinished: {
verifyRegisteredNameSlot()
}
}
}
RowLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignRight
visible:{refreshVariable
var result = registeredIdNeedsSet
&& (regNameUi
!== CurrentAccountSettingsScrollPage.BLANK)
return result}
LookupStatusLabel {
id: lookupStatusLabel
Layout.fillWidth: true
MouseArea {
id: lookupStatusLabelArea
anchors.fill: parent
property bool isHovering: false
onEntered: isHovering = true
onExited: isHovering = false
hoverEnabled: true
}
ToolTip.visible: lookupStatusLabelArea.isHovering
ToolTip.text: {
borderColorMode: {
switch (regNameUi) {
case CurrentAccountSettingsScrollPage.BLANK:
return qsTr("")
case CurrentAccountSettingsScrollPage.INVALIDFORM:
return qsTr("A registered name should not have any spaces and must be at least three letters long")
case CurrentAccountSettingsScrollPage.TAKEN:
return qsTr("This name is already taken")
return InfoLineEdit.ERROR
case CurrentAccountSettingsScrollPage.FREE:
return qsTr("Register this name")
case CurrentAccountSettingsScrollPage.SEARCHING:
return qsTr("")
default:
return qsTr("")
}
}
lookupStatusState: {
switch (regNameUi) {
return InfoLineEdit.RIGHT
case CurrentAccountSettingsScrollPage.BLANK:
return "Blank"
case CurrentAccountSettingsScrollPage.INVALIDFORM:
return "Invalid"
case CurrentAccountSettingsScrollPage.TAKEN:
return "Taken"
case CurrentAccountSettingsScrollPage.FREE:
return "Free"
case CurrentAccountSettingsScrollPage.SEARCHING:
return "Searching"
default:
return "Blank"
return InfoLineEdit.NORMAL
}
}
}
HoverableButtonTextItem {
id: btnRegisterName
visible: {refreshVariable
var result = registeredIdNeedsSet
&& (regNameUi
=== CurrentAccountSettingsScrollPage.FREE)
return result}
Layout.minimumWidth: preferredColumnWidth
Layout.preferredWidth: preferredColumnWidth
Layout.maximumWidth: preferredColumnWidth
Layout.minimumHeight: JamiTheme.preferredFieldHeight
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
text: qsTr("Register")
font.pointSize: JamiTheme.buttonFontSize
font.kerning: true
onImageClicked: {
slotRegisterName()
}
toolTipText: qsTr("Register the name as typed")
onTextEdited: {
verifyRegisteredNameSlot()
}
radius: height / 2
onEditingFinished: {
verifyRegisteredNameSlot()
}
}
}
}
......@@ -872,87 +771,84 @@ Rectangle {
ColumnLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
Layout.leftMargin: JamiTheme.preferredMarginSize
spacing: 8
HoverableButtonTextItem {
MaterialButton {
id: passwdPushButton
visible: ClientWrapper.settingsAdaptor.getAccountConfig_Manageruri() === ""
Layout.alignment: Qt.AlignHCenter
Layout.minimumWidth: JamiTheme.preferredButtonWidth
Layout.preferredWidth: JamiTheme.preferredButtonWidth
Layout.maximumWidth: JamiTheme.preferredButtonWidth
Layout.minimumHeight: JamiTheme.preferredFieldHeight
color: JamiTheme.buttonTintedBlack
hoveredColor: JamiTheme.buttonTintedBlackHovered
pressedColor: JamiTheme.buttonTintedBlackPressed
outlined: true
Layout.minimumHeight: JamiTheme.preferredFieldHeight
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
Layout.minimumWidth: JamiTheme.preferredFieldWidth
Layout.preferredWidth: JamiTheme.preferredFieldWidth
Layout.maximumWidth: JamiTheme.preferredFieldWidth
Layout.alignment: Qt.AlignHCenter
text: ClientWrapper.accountAdaptor.hasPassword() ? qsTr("Change Password") : qsTr("Set Password")
toolTipText: ClientWrapper.accountAdaptor.hasPassword() ? qsTr("Change the current password") : qsTr("Currently no password, press this button to set a password")
font.pointSize: JamiTheme.textFontSize
font.kerning: true
toolTipText: ClientWrapper.accountAdaptor.hasPassword() ?
qsTr("Change the current password") :
qsTr("Currently no password, press this button to set a password")
text: ClientWrapper.accountAdaptor.hasPassword() ? qsTr("Change Password") :
qsTr("Set Password")
radius: height / 2
source: "qrc:/images/icons/round-edit-24px.svg"
onClicked: {
passwordClicked()
}
}
HoverableButtonTextItem {
MaterialButton {
id: btnExportAccount
visible: ClientWrapper.settingsAdaptor.getAccountConfig_Manageruri() === ""
Layout.alignment: Qt.AlignHCenter
Layout.minimumWidth: JamiTheme.preferredButtonWidth
Layout.preferredWidth: JamiTheme.preferredButtonWidth
Layout.maximumWidth: JamiTheme.preferredButtonWidth
Layout.minimumHeight: JamiTheme.preferredFieldHeight
color: JamiTheme.buttonTintedBlack
hoveredColor: JamiTheme.buttonTintedBlackHovered
pressedColor: JamiTheme.buttonTintedBlackPressed
outlined: true
Layout.minimumHeight: JamiTheme.preferredFieldHeight
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
Layout.minimumWidth: JamiTheme.preferredFieldWidth
Layout.preferredWidth: JamiTheme.preferredFieldWidth
Layout.maximumWidth: JamiTheme.preferredFieldWidth
Layout.alignment: Qt.AlignHCenter
toolTipText: qsTr("Press this button to export account to a .gz file")
text: qsTr("Export Account")
font.pointSize: JamiTheme.textFontSize
font.kerning: true
radius: height / 2
source: "qrc:/images/icons/round-save_alt-24px.svg"
onClicked: {
exportAccountSlot()
}
}
HoverableButtonTextItem {
id: btnDeletAccount
MaterialButton {
id: btnDeleteAccount
backgroundColor: "red"
onEnterColor: Qt.rgba(150 / 256, 0, 0, 0.7)
onDisabledBackgroundColor: Qt.rgba(
255 / 256,
0, 0, 0.8)
onPressColor: backgroundColor
textColor: "white"
color: JamiTheme.buttonTintedRed
hoveredColor: JamiTheme.buttonTintedRedHovered
pressedColor: JamiTheme.buttonTintedRedPressed
Layout.alignment: Qt.AlignHCenter
Layout.minimumWidth: JamiTheme.preferredButtonWidth
Layout.preferredWidth: JamiTheme.preferredButtonWidth
Layout.maximumWidth: JamiTheme.preferredButtonWidth
Layout.minimumHeight: JamiTheme.preferredFieldHeight
Layout.minimumHeight: JamiTheme.preferredFieldHeight
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
Layout.minimumWidth: JamiTheme.preferredFieldWidth
Layout.preferredWidth: JamiTheme.preferredFieldWidth
Layout.maximumWidth: JamiTheme.preferredFieldWidth
Layout.alignment: Qt.AlignHCenter
toolTipText: qsTr("Press this button to delete this account")
text: qsTr("Delete Account")
font.pointSize: JamiTheme.textFontSize
font.kerning: true
radius: height / 2
source: "qrc:/images/icons/delete_forever-24px.svg"
onClicked: {
delAccountSlot()
......@@ -1013,25 +909,29 @@ Rectangle {
}
}
HoverableButtonTextItem {
MaterialButton {
id: linkDevPushButton
visible: ClientWrapper.settingsAdaptor.getAccountConfig_Manageruri() === ""
Layout.maximumWidth: JamiTheme.preferredButtonWidth
Layout.preferredWidth: JamiTheme.preferredButtonWidth
Layout.minimumWidth: JamiTheme.preferredButtonWidth
Layout.maximumHeight: JamiTheme.preferredFieldHeight
Layout.minimumHeight: JamiTheme.preferredFieldHeight
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.minimumHeight: JamiTheme.preferredFieldHeight
Layout.alignment: Qt.AlignHCenter
radius: height / 2
Layout.maximumHeight: JamiTheme.preferredFieldHeight
Layout.minimumWidth: JamiTheme.preferredFieldWidth
Layout.preferredWidth: JamiTheme.preferredFieldWidth
Layout.maximumWidth: JamiTheme.preferredFieldWidth
Layout.alignment: Qt.AlignCenter
color: JamiTheme.buttonTintedBlack
hoveredColor: JamiTheme.buttonTintedBlackHovered
pressedColor: JamiTheme.buttonTintedBlackPressed
outlined: true
toolTipText: qsTr("Press to link one more device with this account")
text: qsTr("+ Link Another Device")
source: "qrc:/images/icons/round-add-24px.svg"
text: qsTr("Link Another Device")
font.pointSize: JamiTheme.textFontSize
font.kerning: true
......@@ -1068,7 +968,8 @@ Rectangle {
eText: qsTr("Banned Contacts")
fontSize: JamiTheme.headerFontSize
maxWidth: accountViewRect.width - bannedContactsBtn.width -JamiTheme.preferredMarginSize*4
maxWidth: accountViewRect.width - bannedContactsBtn.width
- JamiTheme.preferredMarginSize*4
}
HoverableButtonTextItem {
......@@ -1088,8 +989,9 @@ Rectangle {
toolTipText: qsTr("press to open or hide display of banned contact")
source: bannedContactsListWidget.visible? "qrc:/images/icons/round-arrow_drop_up-24px.svg" :
"qrc:/images/icons/round-arrow_drop_down-24px.svg"
source: bannedContactsListWidget.visible?
"qrc:/images/icons/round-arrow_drop_up-24px.svg" :
"qrc:/images/icons/round-arrow_drop_down-24px.svg"
onClicked: {
toggleBannedContacts()
}
......@@ -1157,7 +1059,8 @@ Rectangle {
eText: qsTr("Advanced Account Settings")
fontSize: JamiTheme.headerFontSize
maxWidth: accountViewRect.width - advancedAccountSettingsPButton.width -JamiTheme.preferredMarginSize*4
maxWidth: accountViewRect.width - advancedAccountSettingsPButton.width
- JamiTheme.preferredMarginSize*6
}
HoverableButtonTextItem {
......@@ -1190,7 +1093,8 @@ Rectangle {
advanceSettingsView.visible = !advanceSettingsView.visible
if (advanceSettingsView.visible) {
advanceSettingsView.updateAccountInfoDisplayedAdvance()
accountScrollView.vScrollBar.position = rowAdvancedSettingsBtn.y / accountViewLayout.height
accountScrollView.vScrollBar.position =
rowAdvancedSettingsBtn.y / accountViewLayout.height
} else {
accountScrollView.vScrollBar.position = 0
}
......
......@@ -229,10 +229,10 @@ Rectangle {
}
}
InfoLineEdit {
MaterialLineEdit {
id: displaySIPNameLineEdit
Layout.maximumWidth: JamiTheme.preferredButtonWidth
Layout.maximumWidth: JamiTheme.preferredFieldWidth
Layout.minimumHeight: JamiTheme.preferredFieldHeight
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
......@@ -244,6 +244,7 @@ Rectangle {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
padding: 8
onEditingFinished: {
ClientWrapper.accountAdaptor.setCurrAccDisplayName(
......@@ -294,7 +295,7 @@ Rectangle {
maxWidth: preferredColumnWidth
}
InfoLineEdit {
MaterialLineEdit {
id: usernameSIP
fieldLayoutWidth: preferredColumnWidth
......@@ -305,6 +306,12 @@ Rectangle {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
Layout.maximumWidth: preferredColumnWidth
Layout.minimumHeight: JamiTheme.preferredFieldHeight
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
padding: 8
onEditingFinished: {
ClientWrapper.settingsAdaptor.setAccountConfig_Username(
usernameSIP.text)
......@@ -323,17 +330,23 @@ Rectangle {
maxWidth: preferredColumnWidth
}
InfoLineEdit {
MaterialLineEdit {
id: hostnameSIP
fieldLayoutWidth: preferredColumnWidth
font.pointSize: JamiTheme.settingsFontSize // Albert: button?
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
Layout.maximumWidth: preferredColumnWidth
Layout.minimumHeight: JamiTheme.preferredFieldHeight
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
padding: 8
onEditingFinished: {
ClientWrapper.settingsAdaptor.setAccountConfig_Hostname(
hostnameSIP.text)
......@@ -352,7 +365,7 @@ Rectangle {
maxWidth: preferredColumnWidth
}
InfoLineEdit {
MaterialLineEdit {
id: proxySIP
fieldLayoutWidth: preferredColumnWidth
......@@ -363,6 +376,12 @@ Rectangle {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
Layout.maximumWidth: preferredColumnWidth
Layout.minimumHeight: JamiTheme.preferredFieldHeight
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
padding: 8
onEditingFinished: {
ClientWrapper.settingsAdaptor.setAccountConfig_ProxyServer(
proxySIP.text)
......@@ -381,7 +400,7 @@ Rectangle {
maxWidth: preferredColumnWidth
}
InfoLineEdit {
MaterialLineEdit {
id: passSIPlineEdit
fieldLayoutWidth: preferredColumnWidth
......@@ -393,6 +412,12 @@ Rectangle {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
Layout.maximumWidth: preferredColumnWidth
Layout.minimumHeight: JamiTheme.preferredFieldHeight
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
padding: 8
onEditingFinished: {
ClientWrapper.settingsAdaptor.setAccountConfig_Password(
passSIPlineEdit.text)
......@@ -401,30 +426,24 @@ Rectangle {
}
HoverableButtonTextItem {
id: btnDeletAccount
backgroundColor: "red"
onEnterColor: Qt.rgba(150 / 256, 0, 0, 0.7)
onDisabledBackgroundColor: Qt.rgba(
255 / 256,
0, 0, 0.8)
onPressColor: backgroundColor
textColor: "white"
MaterialButton {
color: JamiTheme.buttonTintedRed
hoveredColor: JamiTheme.buttonTintedRedHovered
pressedColor: JamiTheme.buttonTintedRedPressed
Layout.alignment: Qt.AlignHCenter
Layout.minimumWidth: JamiTheme.preferredButtonWidth
Layout.preferredWidth: JamiTheme.preferredButtonWidth
Layout.maximumWidth: JamiTheme.preferredButtonWidth
Layout.minimumWidth: JamiTheme.preferredFieldWidth
Layout.preferredWidth: JamiTheme.preferredFieldWidth
Layout.maximumWidth: JamiTheme.preferredFieldWidth
Layout.minimumHeight: JamiTheme.preferredFieldHeight
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
toolTipText: qsTr("Press this button to delete this account")
text: qsTr("Delete Account")
toolTipText: qsTr("Delete this account")
font.pointSize: JamiTheme.textFontSize
font.kerning: true
radius: height / 2
source: "qrc:/images/icons/delete_forever-24px.svg"
onClicked: {
delAccountSlot()
......
......@@ -67,7 +67,6 @@ ItemDelegate {
id: layoutDeviceItemDelegate
anchors.fill: parent
spacing: 8
Image {
Layout.leftMargin: 16
Layout.alignment: Qt.AlignVCenter
......@@ -90,15 +89,16 @@ ItemDelegate {
RowLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
spacing: 0
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
InfoLineEdit {
id: editDeviceName
Layout.preferredWidth: col.width - 100
Layout.maximumWidth: col.width - 100
Layout.minimumWidth: col.width - 100
fieldLayoutWidth: col.width - 100
Layout.preferredWidth: deviceItemDelegate.width - 112
Layout.maximumWidth: deviceItemDelegate.width - 112
Layout.minimumWidth: deviceItemDelegate.width - 112
fieldLayoutWidth: deviceItemDelegate.width - 112
Layout.minimumHeight: 24
Layout.preferredHeight: 24
......@@ -124,43 +124,23 @@ ItemDelegate {
id: elidedTextDeviceName
elide: Text.ElideRight
elideWidth: deviceItemDelegate.width - 80
elideWidth: deviceItemDelegate.width - 112
text: deviceName
}
Label {
id: labelThisDevice
Layout.fillWidth: true
Layout.rightMargin: 16
Layout.minimumHeight: 24
Layout.preferredHeight: 24
Layout.maximumHeight: 24
Layout.alignment: Qt.AlignRight
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignVCenter
visible: isCurrent
font.pointSize: JamiTheme.textFontSize
font.kerning: true
font.italic: true
color: "green"
text: qsTr("this device")
}
}
ElidedTextLabel {
id: labelDeviceId
Layout.fillWidth: true
Layout.leftMargin: 12
Layout.minimumHeight: 24
Layout.preferredHeight: 24
Layout.maximumHeight: 24
maxWidth: deviceItemDelegate.width - 80
maxWidth: deviceItemDelegate.width - 112
eText: deviceId === "" ? qsTr("Device Id") : deviceId
}
......@@ -191,7 +171,9 @@ ItemDelegate {
source: {
if(isCurrent) {
var path = editable ? "qrc:/images/icons/round-edit-24px.svg" : "qrc:/images/icons/round-save_alt-24px.svg"
var path = editable ?
"qrc:/images/icons/round-save_alt-24px.svg" :
"qrc:/images/icons/round-edit-24px.svg"
return path
} else {
return "qrc:/images/icons/round-remove_circle-24px.svg"
......
......@@ -346,7 +346,7 @@ Rectangle {
maxWidth: preferredColumnWidth
}
HoverableRadiusButton {
MaterialButton {
id: downloadButton
Layout.maximumWidth: preferredColumnWidth
......@@ -359,15 +359,12 @@ Rectangle {
Layout.alignment: Qt.AlignRight
radius: height / 2
icon.source: "qrc:/images/icons/round-folder-24px.svg"
icon.height: 24
icon.width: 24
toolTipText: qsTr("Press to choose download folder path")
text: downloadPath
fontPointSize: JamiTheme.buttonFontSize
source: "qrc:/images/icons/round-folder-24px.svg"
color: JamiTheme.buttonTintedGrey
hoveredColor: JamiTheme.buttonTintedGreyHovered
pressedColor: JamiTheme.buttonTintedGreyPressed
onClicked: {
openDownloadFolderSlot()
......@@ -516,10 +513,9 @@ Rectangle {
verticalAlignment: Text.AlignVCenter
}
HoverableRadiusButton {
MaterialButton {
id: recordPathButton
Layout.leftMargin: JamiTheme.preferredMarginSize
Layout.maximumWidth: preferredColumnWidth
Layout.preferredWidth: preferredColumnWidth
Layout.minimumWidth: preferredColumnWidth
......@@ -530,15 +526,12 @@ Rectangle {
Layout.alignment: Qt.AlignRight
radius: height / 2
icon.source: "qrc:/images/icons/round-folder-24px.svg"
icon.height: 24
icon.width: 24
toolTipText: qsTr("Press to choose record folder path")
text: recordPath
fontPointSize: JamiTheme.buttonFontSize
source: "qrc:/images/icons/round-folder-24px.svg"
color: JamiTheme.buttonTintedGrey
hoveredColor: JamiTheme.buttonTintedGreyHovered
pressedColor: JamiTheme.buttonTintedGreyPressed
onClicked: {
openRecordFolderSlot()
......@@ -597,9 +590,9 @@ Rectangle {
id: checkUpdateButton
Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: JamiTheme.preferredButtonWidth
Layout.preferredWidth: JamiTheme.preferredButtonWidth
Layout.minimumWidth: JamiTheme.preferredButtonWidth
Layout.maximumWidth: JamiTheme.preferredFieldWidth
Layout.preferredWidth: JamiTheme.preferredFieldWidth
Layout.minimumWidth: JamiTheme.preferredFieldWidth
Layout.minimumHeight: JamiTheme.preferredFieldHeight
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
......@@ -619,9 +612,9 @@ Rectangle {
id: installBetaButton
Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: JamiTheme.preferredButtonWidth
Layout.preferredWidth: JamiTheme.preferredButtonWidth
Layout.minimumWidth: JamiTheme.preferredButtonWidth
Layout.maximumWidth: JamiTheme.preferredFieldWidth
Layout.preferredWidth: JamiTheme.preferredFieldWidth
Layout.minimumWidth: JamiTheme.preferredFieldWidth
Layout.minimumHeight: JamiTheme.preferredFieldHeight
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.maximumHeight: JamiTheme.preferredFieldHeight
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment