From a564ed936bedbc6ba610ab002f32daf887889c54 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Mon, 14 Sep 2026 00:49:54 -0600 Subject: [PATCH] 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 --- crates/qbz-qt/qml/shell/HeaderBar.qml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/qbz-qt/qml/shell/HeaderBar.qml b/crates/qbz-qt/qml/shell/HeaderBar.qml index 8a840ce25..fd1bf4c71 100644 --- a/crates/qbz-qt/qml/shell/HeaderBar.qml +++ b/crates/qbz-qt/qml/shell/HeaderBar.qml @@ -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