mirror of
https://github.com/savoirfairelinux/jami-client-qt.git
synced 2026-01-03 18:43:17 +08:00
misc: fix some overlap issues
+ Fix the password entry for linking a new device with password + Fix the linked devices page with a lot of devices + Fix the add default moderators popup Change-Id: I1bac4bd8f55dd91825278399fe39f3503e153edb GitLab: #886
This commit is contained in:
@@ -67,7 +67,7 @@ Popup {
|
||||
|
||||
Layout.preferredHeight: text.length === 0 ? 0 : contentHeight
|
||||
|
||||
font.pointSize: 12
|
||||
font.pointSize: JamiTheme.menuFontSize
|
||||
color: JamiTheme.textColor
|
||||
}
|
||||
|
||||
|
||||
@@ -23,113 +23,66 @@ import net.jami.Models 1.1
|
||||
import net.jami.Constants 1.1
|
||||
import "../../commoncomponents"
|
||||
|
||||
Popup {
|
||||
BaseModalDialog {
|
||||
id: contactPickerPopup
|
||||
|
||||
property int type: ContactList.CONFERENCE
|
||||
|
||||
contentWidth: 250
|
||||
contentHeight: contactPickerPopupRectColumnLayout.height + 50
|
||||
width: Math.min(appWindow.width - 2 * JamiTheme.preferredMarginSize, JamiTheme.preferredDialogWidth)
|
||||
height: Math.min(appWindow.height - 2 * JamiTheme.preferredMarginSize, JamiTheme.preferredDialogHeight)
|
||||
|
||||
padding: 0
|
||||
|
||||
modal: true
|
||||
title: {
|
||||
switch (type) {
|
||||
case ContactList.CONFERENCE:
|
||||
return JamiStrings.addToConference;
|
||||
case ContactList.ADDCONVMEMBER:
|
||||
return JamiStrings.addToConversation;
|
||||
case ContactList.TRANSFER:
|
||||
return JamiStrings.transferThisCall;
|
||||
default:
|
||||
return JamiStrings.addDefaultModerator;
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: Rectangle {
|
||||
id: contactPickerPopupRect
|
||||
width: 250
|
||||
popupContent: ColumnLayout {
|
||||
id: contactPickerPopupRectColumnLayout
|
||||
|
||||
PushButton {
|
||||
id: closeButton
|
||||
Searchbar {
|
||||
id: contactPickerContactSearchBar
|
||||
|
||||
anchors.top: contactPickerPopupRect.top
|
||||
anchors.topMargin: 5
|
||||
anchors.right: contactPickerPopupRect.right
|
||||
anchors.rightMargin: 5
|
||||
imageColor: JamiTheme.textColor
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.margins: 5
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 35
|
||||
|
||||
source: JamiResources.round_close_24dp_svg
|
||||
placeHolderText: type === ContactList.TRANSFER ? JamiStrings.transferTo : JamiStrings.addParticipant
|
||||
|
||||
onClicked: {
|
||||
contactPickerPopup.close();
|
||||
onSearchBarTextChanged: function(text){
|
||||
ContactAdapter.setSearchFilter(text);
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: contactPickerPopupRectColumnLayout
|
||||
JamiListView {
|
||||
id: contactPickerListView
|
||||
|
||||
anchors.top: contactPickerPopupRect.top
|
||||
anchors.topMargin: 15
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 180
|
||||
Layout.bottomMargin: JamiTheme.preferredMarginSize
|
||||
|
||||
Text {
|
||||
id: contactPickerTitle
|
||||
model: ContactAdapter.getContactSelectableModel(type)
|
||||
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.preferredWidth: contactPickerPopupRect.width
|
||||
Layout.preferredHeight: 30
|
||||
delegate: ContactPickerItemDelegate {
|
||||
id: contactPickerItemDelegate
|
||||
|
||||
font.pointSize: JamiTheme.textFontSize
|
||||
font.bold: true
|
||||
color: JamiTheme.textColor
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
text: {
|
||||
switch (type) {
|
||||
case ContactList.CONFERENCE:
|
||||
return JamiStrings.addToConference;
|
||||
case ContactList.ADDCONVMEMBER:
|
||||
return JamiStrings.addToConversation;
|
||||
case ContactList.TRANSFER:
|
||||
return JamiStrings.transferThisCall;
|
||||
default:
|
||||
return JamiStrings.addDefaultModerator;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Searchbar {
|
||||
id: contactPickerContactSearchBar
|
||||
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.margins: 5
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 35
|
||||
|
||||
placeHolderText: type === ContactList.TRANSFER ? JamiStrings.transferTo : JamiStrings.addParticipant
|
||||
|
||||
onSearchBarTextChanged: function(text){
|
||||
ContactAdapter.setSearchFilter(text);
|
||||
}
|
||||
}
|
||||
|
||||
JamiListView {
|
||||
id: contactPickerListView
|
||||
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.preferredWidth: contactPickerPopupRect.width
|
||||
Layout.preferredHeight: 200
|
||||
|
||||
model: ContactAdapter.getContactSelectableModel(type)
|
||||
|
||||
delegate: ContactPickerItemDelegate {
|
||||
id: contactPickerItemDelegate
|
||||
|
||||
showPresenceIndicator: type !== ContactList.TRANSFER
|
||||
}
|
||||
showPresenceIndicator: type !== ContactList.TRANSFER
|
||||
}
|
||||
}
|
||||
|
||||
radius: 10
|
||||
color: JamiTheme.backgroundColor
|
||||
}
|
||||
|
||||
onAboutToShow: {
|
||||
contactPickerListView.model = ContactAdapter.getContactSelectableModel(type);
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ function presentContactPickerPopup(type, parent) {
|
||||
var comp = Qt.createComponent(
|
||||
"../components/ContactPicker.qml")
|
||||
if (comp.status === Component.Ready) {
|
||||
var obj = comp.createObject(parent, { type: type })
|
||||
var obj = comp.createObject(parent, { type: type, parent: parent })
|
||||
if (obj === null) {
|
||||
console.log("Error creating object for contact picker")
|
||||
} else {
|
||||
|
||||
@@ -127,16 +127,21 @@ BaseModalDialog {
|
||||
PasswordTextEdit {
|
||||
id: passwordEdit
|
||||
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.preferredWidth: JamiTheme.preferredFieldWidth
|
||||
Layout.preferredHeight: 48
|
||||
firstEntry: true
|
||||
placeholderText: JamiStrings.password
|
||||
|
||||
placeholderText: JamiStrings.enterCurrentPassword
|
||||
Layout.topMargin: 10
|
||||
Layout.leftMargin: JamiTheme.cornerIconSize
|
||||
Layout.rightMargin: JamiTheme.cornerIconSize
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
Layout.fillWidth: true
|
||||
|
||||
KeyNavigation.up: btnConfirm
|
||||
KeyNavigation.down: KeyNavigation.up
|
||||
|
||||
onDynamicTextChanged: {
|
||||
btnConfirm.enabled = dynamicText.length > 0;
|
||||
}
|
||||
|
||||
onAccepted: btnConfirm.clicked()
|
||||
}
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ SettingsPageBase {
|
||||
Layout.preferredWidth: parent.width
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
title: JamiStrings.linkedThisDevice
|
||||
clip: true
|
||||
}
|
||||
|
||||
LinkedDevicesBase {
|
||||
@@ -78,6 +79,7 @@ SettingsPageBase {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
inverted: true
|
||||
isCurrent: false
|
||||
clip: true
|
||||
title: JamiStrings.linkedOtherDevices
|
||||
}
|
||||
}
|
||||
@@ -92,7 +94,6 @@ SettingsPageBase {
|
||||
text: JamiStrings.linkedAccountDescription
|
||||
color: JamiTheme.textColor
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
font.pixelSize: JamiTheme.settingsDescriptionPixelSize
|
||||
|
||||
Reference in New Issue
Block a user