Design rework dialpad and account manager

- Hide gears in accounts manager
- Round the dialpad
- set focus and show it on dialpad when mouse is hovering it
This commit is contained in:
Julien Wadel 2020-04-23 14:38:19 +02:00
parent 345432b8fd
commit 5e66517488
4 changed files with 33 additions and 3 deletions

View file

@ -12,6 +12,9 @@ QtObject {
property int rowSpacing: 0
property int width: 180
property color color: Colors.k
property color selectedColor : Colors.m
property int selectedBorderWidth: 2
property real radius : 5.0
property QtObject button: QtObject {
property QtObject color: QtObject {

View file

@ -14,8 +14,9 @@ Rectangle {
property var container: parent
property var call
color: TelKeypadStyle.color
color: TelKeypadStyle.color // useless as it is overriden by buttons color, but keep it if buttons are transparent
onActiveFocusChanged: {if(activeFocus) selectedArea.border.width=TelKeypadStyle.selectedBorderWidth; else selectedArea.border.width=0}
layer {
effect: PopupShadow {}
enabled: true
@ -23,6 +24,7 @@ Rectangle {
height: TelKeypadStyle.height
width: TelKeypadStyle.width
radius:TelKeypadStyle.radius+1.0 // +1 for avoid mixing color with border slection (some pixels can be print after the line)
Keys.onPressed: {
var index = Logic.mapKeyToButtonIndex(event.key)
@ -61,7 +63,7 @@ Rectangle {
text: modelData
onClicked: telKeypad.call.sendDtmf(modelData)
onClicked: telKeypad.call.sendDtmf(modelData)
}
}
}
@ -98,4 +100,27 @@ Rectangle {
onReleased: Math.abs(_mouseX - mouse.x) <= delta && Math.abs(_mouseY - mouse.y) <= delta &&
Logic.sendDtmf(_id)
}
Rectangle{
id: selectedArea
anchors.fill:parent
color:"transparent"
border.color:TelKeypadStyle.selectedColor
border.width:0
focus:false
enabled:false
radius:TelKeypadStyle.radius
}
MouseArea
{// Just take hover events and set popup to do its automatic close if mouse is not inside field/popup area
anchors.fill: parent
onContainsMouseChanged: (containsMouse?telKeypad.forceActiveFocus():telKeypad.focus=false)
hoverEnabled:true
preventStealing: true
propagateComposedEvents:true
onPressed: mouse.accepted=false
onReleased: mouse.accepted=false
onClicked: mouse.accepted=false
onDoubleClicked: mouse.accepted=false
onPressAndHold: mouse.accepted=false
}
}

View file

@ -18,6 +18,7 @@ Item {
Rectangle {
anchors.fill: parent
color: button.color
radius:TelKeypadStyle.radius+2.0
ColumnLayout {
anchors.fill: parent

View file

@ -85,6 +85,7 @@ DialogPlus {
icon: 'options'
iconSize: 30
anchors.fill: parent
visible:false
//TODO handle click and jump to proxy config settings
}