Commit 28e7ccac authored by Aaron J. Seigo's avatar Aaron J. Seigo

dialer can now be dismissed by deleting numbers; white on black visuals

parent d344ffef
...@@ -6,8 +6,9 @@ Text { ...@@ -6,8 +6,9 @@ Text {
height: parent.buttonHeight height: parent.buttonHeight
horizontalAlignment: Qt.AlignHCenter horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter verticalAlignment: Qt.AlignVCenter
color: dialer.textColor
font.pixelSize: Math.floor((width - (units.largeSpacing)) / 2) font.pixelSize: Math.floor((width - (units.largeSpacing)) / 2)
property alias sub: longHold.text; property alias sub: longHold.text
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
...@@ -26,16 +27,17 @@ Text { ...@@ -26,16 +27,17 @@ Text {
Text { Text {
id: longHold id: longHold
visible: text.length > 0
opacity: 0.7
height: parent.height
width: parent.width / 3
verticalAlignment: Qt.AlignVCenter
anchors { anchors {
top: parent.top top: parent.top
right: parent.right right: parent.right
} }
height: parent.height
width: parent.width / 3
verticalAlignment: Qt.AlignVCenter
visible: text.length > 0
opacity: 0.7
font.pixelSize: parent.pixelSize * .8 font.pixelSize: parent.pixelSize * .8
color: dialer.textColor
} }
} }
...@@ -4,9 +4,10 @@ import "../components" ...@@ -4,9 +4,10 @@ import "../components"
Rectangle { Rectangle {
id: dialer id: dialer
color: "white" color: "black"
opacity: 0.5 opacity: 0.8
property color textColor: "white"
property bool calling: false // needs to be connected to a system service property bool calling: false // needs to be connected to a system service
property bool enableButtons: calling property bool enableButtons: calling
...@@ -37,6 +38,7 @@ Rectangle { ...@@ -37,6 +38,7 @@ Rectangle {
horizontalAlignment: Qt.AlignRight horizontalAlignment: Qt.AlignRight
verticalAlignment: Qt.AlignVCenter verticalAlignment: Qt.AlignVCenter
font.pixelSize: one.font.pixelSize font.pixelSize: one.font.pixelSize
color: textColor
} }
Grid { Grid {
...@@ -81,7 +83,14 @@ Rectangle { ...@@ -81,7 +83,14 @@ Rectangle {
} }
DialerIconButton { DialerIconButton {
source: "edit-clear" source: "edit-clear"
callback: function() { status.text = status.text.substr(0, status.text.length - 1); } callback: function() {
if (status.text.length > 0) {
status.text = status.text.substr(0, status.text.length - 1);
} else {
dialer.calling = true;
dialer.calling = false;
}
}
} }
} }
} }
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