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

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

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