mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
dialer in call
This commit is contained in:
parent
3e06e3c55d
commit
f82f3cf189
4 changed files with 32 additions and 34 deletions
|
|
@ -433,39 +433,34 @@ Window {
|
|||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
SearchBar {
|
||||
id: dialerTextInput
|
||||
Layout.fillWidth: true
|
||||
// Layout.maximumWidth: mainItem.width
|
||||
Layout.leftMargin: 10 * DefaultStyle.dp
|
||||
Layout.rightMargin: 10 * DefaultStyle.dp
|
||||
magnifierVisible: false
|
||||
color: DefaultStyle.grey_0
|
||||
borderColor: DefaultStyle.grey_200
|
||||
placeholderText: ""
|
||||
numericPad: numPad
|
||||
Component.onCompleted: numericPad.visible = true
|
||||
numericPadButton.visible: false
|
||||
}
|
||||
Item {
|
||||
Component.onCompleted: console.log("num pad", x, y, width, height)
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: numPad.height
|
||||
Layout.fillHeight: numPad.height
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
visible: false
|
||||
onVisibleChanged: {
|
||||
console.log("visible cvhanged", visible)
|
||||
if (visible) numPad.open()
|
||||
else numPad.close()
|
||||
}
|
||||
Layout.topMargin: 10 * DefaultStyle.dp
|
||||
NumericPad {
|
||||
id: numPad
|
||||
width: parent.width
|
||||
visible: parent.visible
|
||||
closeButtonVisible: false
|
||||
onVisibleChanged: {
|
||||
console.log("visible numpad", visible, parent.visible)
|
||||
onLaunchCall: {
|
||||
var callVarObject = UtilsCpp.createCall(dialerTextInput.text + "@sip.linphone.org")
|
||||
}
|
||||
onOpened: console.log("open")
|
||||
onClosed: console.log("close")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -577,9 +572,8 @@ Window {
|
|||
enabledIcon: AppIcons.verticalDots
|
||||
Layout.preferredWidth: 55 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 55 * DefaultStyle.dp
|
||||
onCheckedChanged: {
|
||||
if (checked) moreOptionsMenu.open()
|
||||
else moreOptionsMenu.close()
|
||||
onPressed: {
|
||||
moreOptionsMenu.visible = !moreOptionsMenu.visible
|
||||
}
|
||||
}
|
||||
Popup {
|
||||
|
|
@ -588,14 +582,8 @@ Window {
|
|||
y: moreOptionsButton.y - height
|
||||
padding: 20 * DefaultStyle.dp
|
||||
|
||||
closePolicy: Control.Popup.CloseOnEscape
|
||||
onClosed: moreOptionsButton.checked = false
|
||||
|
||||
Connections {
|
||||
target: rightPanel
|
||||
onVisibleChanged: if (!rightPanel.visible) moreOptionsMenu.close()
|
||||
}
|
||||
|
||||
// closePolicy: Control.Popup.CloseOnEscape
|
||||
onAboutToHide: moreOptionsButton.checked = false
|
||||
contentItem: ColumnLayout {
|
||||
id: optionsList
|
||||
spacing: 10 * DefaultStyle.dp
|
||||
|
|
@ -604,7 +592,7 @@ Window {
|
|||
id: dialerButton
|
||||
// width: 150
|
||||
Layout.fillWidth: true
|
||||
height: 32 * DefaultStyle.dp
|
||||
// height: 32 * DefaultStyle.dp
|
||||
background: Item {
|
||||
visible: false
|
||||
}
|
||||
|
|
@ -627,7 +615,7 @@ Window {
|
|||
Control.Button {
|
||||
id: speakerButton
|
||||
Layout.fillWidth: true
|
||||
height: 32 * DefaultStyle.dp
|
||||
// height: 32 * DefaultStyle.dp
|
||||
checkable: true
|
||||
background: Item {
|
||||
visible: false
|
||||
|
|
|
|||
|
|
@ -30,9 +30,16 @@ Control.Popup {
|
|||
source: numPadBackground
|
||||
shadowEnabled: true
|
||||
shadowColor: DefaultStyle.grey_1000
|
||||
shadowOpacity: 0.1
|
||||
shadowOpacity: 0.8
|
||||
shadowHorizontalOffset: 10 * DefaultStyle.dp
|
||||
shadowBlur: 1
|
||||
}
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: parent.height / 2
|
||||
anchors.bottom: parent.bottom
|
||||
color: DefaultStyle.grey_100
|
||||
}
|
||||
Button {
|
||||
id: closeButton
|
||||
visible: mainItem.closeButtonVisible
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ Rectangle {
|
|||
property int textInputWidth: 350 * DefaultStyle.dp
|
||||
property color borderColor: "transparent"
|
||||
property string text: textField.text
|
||||
property bool magnifierVisible: true
|
||||
property var validator: RegularExpressionValidator{}
|
||||
property Control.Popup numericPad
|
||||
property alias numericPadButton: dialerButton
|
||||
|
|
@ -36,6 +37,7 @@ Rectangle {
|
|||
border.color: textField.activeFocus ? DefaultStyle.main2_500main : mainItem.borderColor
|
||||
Image {
|
||||
id: magnifier
|
||||
visible: mainItem.magnifierVisible
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: 10 * DefaultStyle.dp
|
||||
|
|
@ -45,7 +47,8 @@ Rectangle {
|
|||
}
|
||||
Control.TextField {
|
||||
id: textField
|
||||
anchors.left: magnifier.right
|
||||
anchors.left: magnifier.visible ? magnifier.right : parent.left
|
||||
anchors.leftMargin: magnifier.visible ? 0 : 10 * DefaultStyle.dp
|
||||
anchors.right: clearTextButton.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
placeholderText: mainItem.placeholderText
|
||||
|
|
@ -63,9 +66,9 @@ Rectangle {
|
|||
opacity: 0.
|
||||
}
|
||||
cursorDelegate: Rectangle {
|
||||
visible: textField.activeFocus
|
||||
color: DefaultStyle.main1_500_main
|
||||
width: 2 * DefaultStyle.dp
|
||||
visible: textField.cursorVisible
|
||||
color: DefaultStyle.main2_500main
|
||||
width: 1 * DefaultStyle.dp
|
||||
}
|
||||
}
|
||||
Control.Button {
|
||||
|
|
|
|||
|
|
@ -19,4 +19,4 @@ Control.ToolTip {
|
|||
wrapMode: Text.Wrap
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue