mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-09 13:56:10 +00:00
f6355dc4a6
- make the left/right padding and internal spacing consistent with the
Figma design
- the padding itself got broken by a behavior-incompatible change introduced in
17aaec2d53 (diff-451194c72ab50ea2586b6f1d6521b81d9a93206069788117326788be28b638fd)
;
this change is however correct but we can no longer rely on the
implementation detail that used to "reset" the left/right padding to its
default value when we set `leftPadding: 0`
Fixes #8910
65 lines
1.5 KiB
QML
65 lines
1.5 KiB
QML
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
|
|
|
|
import utils 1.0
|
|
|
|
StatusInput {
|
|
id: cursorInput
|
|
|
|
property string cursorColor: Theme.palette.primaryColor1
|
|
|
|
leftPadding: 0
|
|
rightPadding: 0
|
|
topPadding: 0
|
|
bottomPadding: 0
|
|
|
|
placeholderText: ""
|
|
input.edit.objectName: "amountInput"
|
|
input.edit.cursorVisible: true
|
|
input.edit.font.pixelSize: Utils.getFontSizeBasedOnLetterCount(text)
|
|
input.placeholderFont.pixelSize: 34
|
|
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
|
|
running: input.edit.cursorVisible
|
|
|
|
PropertyAction {
|
|
target: cursor
|
|
property: 'visible'
|
|
value: true
|
|
}
|
|
|
|
PauseAnimation {
|
|
duration: 600
|
|
}
|
|
|
|
PropertyAction {
|
|
target: cursor
|
|
property: 'visible'
|
|
value: false
|
|
}
|
|
|
|
PauseAnimation {
|
|
duration: 600
|
|
}
|
|
|
|
onStopped: {
|
|
cursor.visible = false
|
|
}
|
|
}
|
|
}
|
|
}
|