fix(StatusBaseInput): ensure input text is selectable with mouse

This also sets the correcrt selection and selected text color.
This commit is contained in:
Pascal Precht 2021-07-23 12:19:21 +02:00 committed by Pascal Precht
parent e8cce72c25
commit ab3035930b
1 changed files with 76 additions and 74 deletions

View File

@ -68,6 +68,12 @@ Item {
return sensor.containsMouse ? Theme.palette.primaryColor2 : "transparent"
}
MouseArea {
id: sensor
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.IBeamCursor
onClicked: edit.forceActiveFocus()
Flickable {
id: flick
@ -100,6 +106,8 @@ Item {
id: edit
width: flick.width
selectByMouse: true
selectionColor: Theme.palette.primaryColor2
selectedTextColor: color
anchors.verticalCenter: parent.verticalCenter
focus: true
@ -139,15 +147,9 @@ Item {
Theme.palette.directColor6
}
}
}
} // Flickable
MouseArea {
id: sensor
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.IBeamCursor
onClicked: edit.forceActiveFocus()
}
} // Rectangle
StatusFlatRoundButton {