mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-18 13:18:30 +00:00
* Fix focus and screen reader on Dialog #LINQT-2197 * Fix dialer accessibility #LINQT-2204 * Add accessibility to voicemail button #LINQT-2200 *Add list annoncement on magicsearch suggestions #LINQT-2205 * Fix accessibility on contact lists #LINQT-2206 * Fix screen reader does not say values on combobox #LINQT-2195 * Fix focus when close modal #LINQT-2220 * Focus end call button when accepting a call #LINQT-2223
86 lines
2.4 KiB
QML
86 lines
2.4 KiB
QML
import QtQuick
|
|
import QtQuick.Controls.Basic as Control
|
|
import QtQuick.Layouts
|
|
import QtQuick.Effects
|
|
import Linphone
|
|
import UtilsCpp
|
|
import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle
|
|
import "qrc:/qt/qml/Linphone/view/Control/Tool/Helper/utils.js" as Utils
|
|
|
|
Control.Popup {
|
|
id: mainItem
|
|
closePolicy: Control.Popup.CloseOnEscape
|
|
padding: Utils.getSizeWithScreenRatio(10)
|
|
property bool closeButtonVisible: true
|
|
property bool roundedBottom: false
|
|
property bool lastRowVisible: true
|
|
property var currentCall
|
|
focus: true
|
|
onOpened: {
|
|
const focusReason = FocusNavigator.doesLastFocusWasKeyboard() ? Qt.TabFocusReason : Qt.OtherFocusReason
|
|
numPad.forceActiveFocus(focusReason)
|
|
}
|
|
signal buttonPressed(string text)
|
|
signal keyPadKeyPressed(KeyEvent event)
|
|
onKeyPadKeyPressed: (event) => {
|
|
numPad.handleKeyPadEvent(event)
|
|
}
|
|
signal launchCall()
|
|
signal wipe()
|
|
|
|
background: Item {
|
|
anchors.fill: parent
|
|
Rectangle {
|
|
id: numPadBackground
|
|
width: parent.width
|
|
height: parent.height
|
|
color: DefaultStyle.grey_100
|
|
radius: Utils.getSizeWithScreenRatio(20)
|
|
bottomLeftRadius: mainItem.roundedBottom ? radius : 0
|
|
bottomRightRadius: mainItem.roundedBottom ? radius : 0
|
|
}
|
|
MultiEffect {
|
|
id: effect
|
|
anchors.fill: numPadBackground
|
|
source: numPadBackground
|
|
shadowEnabled: true
|
|
shadowColor: DefaultStyle.grey_1000
|
|
shadowOpacity: 0.1
|
|
shadowBlur: 0.1
|
|
z: -1
|
|
}
|
|
MouseArea {
|
|
anchors.fill: parent
|
|
onClicked: numPad.forceActiveFocus()
|
|
}
|
|
}
|
|
contentItem: ColumnLayout{
|
|
Accessible.role: Accessible.Dialog
|
|
//: "Numeric Pad"
|
|
Accessible.name : qsTr("numeric_pad_accessible_name")
|
|
BigButton {
|
|
id: closeButton
|
|
visible: mainItem.closeButtonVisible
|
|
Layout.alignment: Qt.AlignRight
|
|
icon.source: AppIcons.closeX
|
|
icon.width: Utils.getSizeWithScreenRatio(24)
|
|
icon.height: Utils.getSizeWithScreenRatio(24)
|
|
style: ButtonStyle.noBackground
|
|
onClicked: mainItem.close()
|
|
//: Close numeric pad
|
|
Accessible.name: qsTr("close_numeric_pad_accessible_name")
|
|
}
|
|
NumericPad{
|
|
id: numPad
|
|
Layout.alignment: Qt.AlignCenter
|
|
Layout.bottomMargin: Utils.getSizeWithScreenRatio(5)
|
|
lastRowVisible: mainItem.lastRowVisible
|
|
currentCall: mainItem.currentCall
|
|
onButtonPressed: (text) => {
|
|
mainItem.buttonPressed(text)
|
|
}
|
|
onLaunchCall: mainItem.launchCall()
|
|
onWipe: mainItem.wipe()
|
|
}
|
|
}
|
|
}
|