Skip to content

Commit 3511a2b

Browse files
JWWTSLdeepin-bot[bot]
authored andcommitted
fix: Optimize UI display of the network module
log: Keep text field widths consistent pms: bug-337919
1 parent 11ed2b0 commit 3511a2b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dcc-network/qml/NetFileChooseEdit.qml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
1+
// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
22
// SPDX-License-Identifier: GPL-3.0-or-later
33
import QtQuick 2.15
44
import QtQuick.Layouts 1.15
@@ -8,6 +8,7 @@ import org.deepin.dtk 1.0 as D
88

99
RowLayout {
1010
id: root
11+
implicitWidth: edit.implicitWidth
1112
property var dataItem
1213
property var nameFilters: [qsTr("All files (*)")]
1314
property alias placeholderText: edit.placeholderText
@@ -30,6 +31,7 @@ RowLayout {
3031
}
3132
D.LineEdit {
3233
id: edit
34+
Layout.preferredWidth: edit.implicitWidth - browseBtn.width - root.spacing
3335
onTextChanged: {
3436
if (!initialized) {
3537
return
@@ -50,7 +52,9 @@ RowLayout {
5052
}
5153
Component.onCompleted: initialized = true
5254
}
55+
5356
NetButton {
57+
id: browseBtn
5458
text: "..."
5559
onClicked: {
5660
fileDialog.createObject(this).open()

0 commit comments

Comments
 (0)