2022-03-18 14:47:51 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
2022-12-14 21:06:14 +00:00
|
|
|
import utils 1.0
|
|
|
|
|
2022-03-18 14:47:51 +00:00
|
|
|
StatusInput {
|
|
|
|
id: cursorInput
|
|
|
|
|
|
|
|
property string cursorColor: Theme.palette.primaryColor1
|
|
|
|
|
|
|
|
leftPadding: 0
|
|
|
|
rightPadding: 0
|
|
|
|
|
2022-07-22 10:28:04 +00:00
|
|
|
placeholderText: ""
|
2022-07-21 12:15:02 +00:00
|
|
|
input.edit.objectName: "amountInput"
|
2022-03-18 14:47:51 +00:00
|
|
|
input.edit.cursorVisible: true
|
2022-12-14 21:06:14 +00:00
|
|
|
input.edit.font.pixelSize: Utils.getFontSizeBasedOnLetterCount(text)
|
|
|
|
input.placeholderFont.pixelSize: 34
|
2022-07-26 18:14:55 +00:00
|
|
|
input.leftPadding: 0
|
2022-03-18 14:47:51 +00:00
|
|
|
input.rightPadding: 0
|
|
|
|
input.topPadding: 0
|
|
|
|
input.bottomPadding: 0
|
|
|
|
input.edit.padding: 0
|
|
|
|
input.background.color: "transparent"
|
|
|
|
input.background.border.width: 0
|
|
|
|
// To-do this needs to be removed once https://github.com/status-im/StatusQ/issues/578 is implemented and cursor is moved to StatusInput
|
|
|
|
input.edit.cursorDelegate: Rectangle {
|
|
|
|
id: cursor
|
|
|
|
visible: input.edit.cursorVisible
|
|
|
|
color: cursorColor
|
|
|
|
width: 2
|
|
|
|
|
|
|
|
SequentialAnimation {
|
|
|
|
loops: Animation.Infinite
|
2022-07-01 11:24:32 +00:00
|
|
|
running: input.edit.cursorVisible
|
2022-03-18 14:47:51 +00:00
|
|
|
|
|
|
|
PropertyAction {
|
|
|
|
target: cursor
|
|
|
|
property: 'visible'
|
|
|
|
value: true
|
|
|
|
}
|
|
|
|
|
|
|
|
PauseAnimation {
|
|
|
|
duration: 600
|
|
|
|
}
|
|
|
|
|
|
|
|
PropertyAction {
|
|
|
|
target: cursor
|
|
|
|
property: 'visible'
|
|
|
|
value: false
|
|
|
|
}
|
|
|
|
|
|
|
|
PauseAnimation {
|
|
|
|
duration: 600
|
|
|
|
}
|
|
|
|
|
|
|
|
onStopped: {
|
|
|
|
cursor.visible = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|