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