fix(qt): the header search text stops short of the clear cross and the Enter glyph

The TextInput spanned the whole box, so a long query ran under the
cross and the Enter hint. It now ends at whichever of the two is
showing, and TextInput scrolls the text inside that width.

cc
This commit is contained in:
vicrodh committed 2026-09-14 00:49:54 -06:00
1 parent ed7fa588ea
commit a564ed936b
1 file changed
+7 -2
+7 -2
View File
@@ -997,9 +997,13 @@ Rectangle {
QbzTextEditMenu { }
id: searchInput
anchors.left: parent.left
anchors.right: parent.right
// Stop short of whatever sits at the right end (the clear cross,
// the Enter glyph while the cortinilla is open): TextInput scrolls
// its text within its own width, so nothing hides under them.
anchors.right: clearCross.visible ? clearCross.left
: (enterHint.visible ? enterHint.left : parent.right)
anchors.leftMargin: 30
anchors.rightMargin: 8
anchors.rightMargin: (clearCross.visible || enterHint.visible) ? 2 : 8
height: parent.height
color: theme.textPrimary
font.pixelSize: 13
@@ -1118,6 +1122,7 @@ Rectangle {
// sits to the LEFT of the ↵ hint while the dropdown is open, at the
// right edge otherwise.
Rectangle {
id: clearCross
visible: searchInput.text !== ""
anchors.right: QbzSearch.cortinillaOpen ? enterHint.left : parent.right
anchors.rightMargin: QbzSearch.cortinillaOpen ? 4 : 5