forked from qt-creator/qt-creator
QmlDesigner: Handle text overflow state for ComboBox
- Text is elided in the overflow state. - Text is aligned to the left in the overflow state. Task-number: QDS-9402 Change-Id: If1cca917a42b8198729591506e8a886ea9a70814 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -32,6 +32,20 @@ TextInput {
|
||||
selectByMouse: false
|
||||
activeFocusOnPress: false
|
||||
clip: true
|
||||
echoMode: TextInput.NoEcho
|
||||
|
||||
Text {
|
||||
id: elidableText
|
||||
anchors.fill: control
|
||||
leftPadding: control.leftPadding
|
||||
rightPadding: control.rightPadding
|
||||
horizontalAlignment: control.horizontalAlignment
|
||||
verticalAlignment: control.verticalAlignment
|
||||
font: control.font
|
||||
color: control.color
|
||||
text: control.text
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: background
|
||||
@@ -128,6 +142,14 @@ TextInput {
|
||||
target: background
|
||||
color: control.style.background.interaction
|
||||
}
|
||||
PropertyChanges {
|
||||
target: control
|
||||
echoMode: TextInput.Normal
|
||||
}
|
||||
PropertyChanges {
|
||||
target: elidableText
|
||||
visible: false
|
||||
}
|
||||
PropertyChanges {
|
||||
target: mouseArea
|
||||
cursorShape: Qt.IBeamCursor
|
||||
|
Reference in New Issue
Block a user