mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-28 22:53:09 +00:00
dialer can now be dismissed by deleting numbers; white on black visuals
This commit is contained in:
parent
d344ffef3a
commit
28e7ccacd8
2 changed files with 20 additions and 9 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue