Commit f1c35aed authored by Bruno Coudoin's avatar Bruno Coudoin
Browse files

core numpad, respect entry size even on keyboard

parent 80a77da1
...@@ -212,14 +212,14 @@ Item { ...@@ -212,14 +212,14 @@ Item {
if(isKeyPressed && !answerFlag) if(isKeyPressed && !answerFlag)
{ {
if(keyValue < 5) if(keyValue < 5 && answer.length < maxDigit)
{ {
answer += keyValue; answer += keyValue;
leftPanel.children[keyValue].color = Qt.lighter(colours[keyValue]) leftPanel.children[keyValue].color = Qt.lighter(colours[keyValue])
leftPanel.children[keyValue].border.width = 5 leftPanel.children[keyValue].border.width = 5
} }
else if(keyValue < 10) else if(keyValue < 10 && answer.length < maxDigit)
{ {
answer += keyValue; answer += keyValue;
rightPanel.children[keyValue - 5].color = Qt.lighter(colours[keyValue - 5]) rightPanel.children[keyValue - 5].color = Qt.lighter(colours[keyValue - 5])
......
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