Commit 70b99923 authored by camilo higuita's avatar camilo higuita

fix dialer buttons layout

parent 8b415b1e
......@@ -182,7 +182,7 @@ Maui.ApplicationWindow
{
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.margins: space.huge
height: toolBarHeight
width: height
......
......@@ -162,19 +162,21 @@ Maui.Page
Maui.GridView
{
id: _gridView
model: _contactsModel
cellWidth: unit * 120
cellHeight: unit * 120
itemSize: Math.min(unit * 120, control.width * 0.4)
itemSize: Math.min(unit * 120)
spacing: space.medium
centerContent: false
adaptContent: true
adaptContent: true
delegate: GridContactDelegate
{
id: _delegate
width: view.cellWidth * 0.95
height: view.cellHeight * 0.95
width: _gridView.cellWidth * 0.95
height: _gridView.cellHeight * 0.95
showMenuIcon: true
Connections
......@@ -182,7 +184,7 @@ Maui.Page
target: _delegate
onClicked:
{
view.currentIndex = index
_gridView.currentIndex = index
_contactDialog.show(list.get(index))
}
onFavClicked:
......
......@@ -6,13 +6,12 @@ import QtQuick.Layouts 1.3
GridLayout
{
id: _grid
height: parent.height
width: parent.width
anchors.centerIn: parent
columns: 3
rows: 3
rowSpacing: space.big
columnSpacing: space.big
rowSpacing: buttonSize * 0.1
columnSpacing: buttonSize * 0.1
// spacing: space.medium
readonly property int buttonFontSize: fontSizes.huge * 1.5
property var model : ["1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "0", "#"]
......
......@@ -10,7 +10,7 @@ Maui.Page
id: control
property alias dialString : _textField.text
property int buttonSize : Math.min( iconSizes.big * 2 , control.width * 0.25)
property int buttonSize : Math.min(iconSizes.big * 1.5 , Math.min(_dialerPad.width, _dialerPad.height) * 0.2)
onDialStringChanged:
{
// Qt.inputMethod.hide();
......@@ -57,47 +57,33 @@ Maui.Page
}
footBar.implicitHeight: iconSizes.big * 3
footBar.spacing: space.huge
footBar.clip: true
footBar.flickable: false
footBar.middleContent: [
Item
{
Layout.fillHeight: true
Layout.fillWidth: true
Button
ToolButton
{
icon.name: "message-new"
icon.color: Kirigami.Theme.textColor
height: buttonSize
width: height
anchors.centerIn: parent
// bg.radius: Math.max(width, height)
// colorScheme.backgroundColor: infoColor
onClicked:
{
_messageComposer.contact = ({tel : dialString})
_messageComposer.open()
}
}
},
Item
{
Layout.fillHeight: true
Layout.fillWidth: true
},
Button
{
id: _callButton
icon.name: "call-start"
icon.color: "white"
icon.width: iconSizes.big
icon.height: iconSizes.big
height: buttonSize
height: iconSizes.big * 1.5
width: height
anchors.centerIn: parent
// bg.radius: Math.max(width, height)
Kirigami.Theme.backgroundColor: suggestedColor
Kirigami.Theme.textColor: Kirigami.Theme.highlightColor
Kirigami.Theme.backgroundColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.2)
onClicked:
{
......@@ -106,37 +92,24 @@ Maui.Page
else
Qt.openUrlExternally("call://" + dialString)
}
}
},
Item
{
Layout.fillHeight: true
Layout.fillWidth: true
},
Button
ToolButton
{
icon.name: "edit-clear"
icon.color: Kirigami.Theme.textColor
height: iconSizes.big * 2
width: height
anchors.centerIn: parent
// bg.radius: Math.max(width, height)
// colorScheme.backgroundColor: warningColor
onClicked:
{
dialString = dialString.slice(0, -1);
}
}
}
]
ColumnLayout
{
id: _layout
width: Math.min(isWide ? control.width * 0.8 : control.width * 0.95, unit * 500)
// height: parent.height
height: parent.height
anchors.centerIn: parent
spacing: space.big
......@@ -145,9 +118,10 @@ Maui.Page
id: _suggestionListView
spacing: space.big
clip: true
visible: count
visible: dialString.length && count
Layout.fillWidth: visible
Layout.minimumHeight: visible ? _60 : 0
// Layout.fillHeight: true
Layout.minimumHeight: visible ? 60 * 1.2 : 0
Layout.preferredHeight: visible ? 60 * 2 : 0
model: _contacsView.listModel
......@@ -188,14 +162,15 @@ Maui.Page
id: _dialerPad
Layout.fillHeight: true
Layout.fillWidth: true
Layout.minimumHeight: unit*300
Layout.minimumHeight: unit*100
Layout.maximumHeight: unit*300
Layout.alignment: Qt.AlignBottom
// Layout.alignment: Qt.AlignBottom
// visible: true
Dialer
{
id: _dialer
height: parent.height
width: parent.width
anchors.centerIn: parent
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment