linphone-desktop/Linphone/view/Control/Popup/NumericPadPopup.qml
Alexandre Jörgensen d2413f33a9 Accessibility fixs :
* Fix focus on first relevant element after changing page with navbar #LINQT-2202
* Improve focus navigation on call history list #LINQT-2201
* Fix missing accessible button name in dialer #LINQT-2221
* Switch from ScrollView to Flickable in parameters
* Add auto scroll on keyboard navigation in settings #LINQT-2219
* Correct back button in settings #LINQT-2209
* Fix focus when open settings page #LINQT-2208
* Arrow in vertical tab bar now change button focus instead of changing page #LINQT-2194
* Fix focus and accessibility label in magic search bar #LINQT-2205
2026-03-09 10:11:53 +01:00

86 lines
2.4 KiB
QML

import QtQuick
import QtQuick.Controls.Basic as Control
import QtQuick.Layouts as Layout
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
leftPadding: Utils.getSizeWithScreenRatio(72)
rightPadding: Utils.getSizeWithScreenRatio(72)
topPadding: Utils.getSizeWithScreenRatio(41)
bottomPadding: Utils.getSizeWithScreenRatio(18)
property bool closeButtonVisible: true
property bool roundedBottom: false
property bool lastRowVisible: true
property var currentCall
onOpened: numPad.forceActiveFocus()
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)
}
MultiEffect {
id: effect
anchors.fill: numPadBackground
source: numPadBackground
shadowEnabled: true
shadowColor: DefaultStyle.grey_1000
shadowOpacity: 0.1
shadowBlur: 0.1
z: -1
}
Rectangle {
width: parent.width
height: parent.height / 2
anchors.bottom: parent.bottom
color: DefaultStyle.grey_100
visible: !mainItem.roundedBottom
}
MouseArea {
anchors.fill: parent
onClicked: numPad.forceActiveFocus()
}
BigButton {
id: closeButton
visible: mainItem.closeButtonVisible
anchors.top: parent.top
anchors.right: parent.right
anchors.topMargin: Utils.getSizeWithScreenRatio(10)
anchors.rightMargin: Utils.getSizeWithScreenRatio(10)
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")
}
}
contentItem: NumericPad{
id: numPad
lastRowVisible: mainItem.lastRowVisible
currentCall: mainItem.currentCall
onButtonPressed: (text) => {
mainItem.buttonPressed(text)
}
onLaunchCall: mainItem.launchCall()
onWipe: mainItem.wipe()
}
}