fix: Use `StatusCursorDelegate` for password inputs (#10890)

This commit is contained in:
Igor Sirotin 2023-06-01 21:23:22 +03:00 committed by GitHub
parent fa656c9535
commit 278654f694
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import QtQuick.Controls 2.14
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Components 0.1
/*!
\qmltype StatusPasswordInput
@ -63,6 +64,7 @@ TextField {
color: Theme.palette.directColor1
selectionColor: Theme.palette.primaryColor2
selectedTextColor: Theme.palette.directColor1
background: Rectangle {
id: inputRectangle
anchors.fill: parent
@ -77,6 +79,9 @@ TextField {
}
}
cursorDelegate: StatusCursorDelegate {
cursorVisible: root.cursorVisible
}
RowLayout {
id: phrase

View File

@ -3,10 +3,18 @@ import QtQuick.Controls 2.13
import utils 1.0
import StatusQ.Components 0.1
TextField {
id: root
font.family: Style.current.baseFont.name
color: readOnly ? Style.current.secondaryText : Style.current.textColor
selectByMouse: !readOnly
selectedTextColor: Style.current.textColor
selectionColor: Style.current.primarySelectionColor
cursorDelegate: StatusCursorDelegate {
cursorVisible: root.cursorVisible
}
}