fix(AppUi): 修复搜索框内容和按钮重叠

This commit is contained in:
youdiansaodongxi 2024-05-14 11:45:59 +08:00
parent 7347f09a77
commit 19e4af733c
1 changed files with 3 additions and 2 deletions

View File

@ -79,8 +79,8 @@ UkuiItems.StyleBackground {
TextInput { TextInput {
id: textInput id: textInput
clip: true clip: true
anchors.right: parent.right anchors.right: clearButton.left
width: parent.width - searchIcon.width width: parent.width - searchIcon.width - clearButton.width
height: parent.height height: parent.height
selectByMouse: true selectByMouse: true
verticalAlignment: TextInput.AlignVCenter verticalAlignment: TextInput.AlignVCenter
@ -113,6 +113,7 @@ UkuiItems.StyleBackground {
} }
UkuiItems.Button { UkuiItems.Button {
id: clearButton
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: (parent.height - height) / 2 anchors.rightMargin: (parent.height - height) / 2
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter