Skip to content

Commit 492f5c0

Browse files
committed
fix: Replace the dialog box title to D.Label component
Replace plain title text with a centered D.Label in DialogTitleBar Log: Center the dialog window title with downward offset fix: 对话框标题替换为 D.Label 组件 将 DialogTitleBar 中的纯文本标题替换为 D.Label 组件 Log: 将对话框窗口标题居中并设置下移偏移 PMS: BUG-361279
1 parent 5d800eb commit 492f5c0

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

qt6/src/qml/DialogWindow.qml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,17 @@ Window {
6262
sourceComponent: DialogTitleBar {
6363
enableInWindowBlendBlur: false
6464
icon.name: control.icon
65-
title: control.title
6665
}
6766
}
6867

68+
D.Label {
69+
text: control.title
70+
Layout.fillWidth: true
71+
Layout.alignment: Qt.AlignHCenter
72+
elide: Text.ElideRight
73+
horizontalAlignment: Text.AlignHCenter
74+
}
75+
6976
Item {
7077
id: contentLoader
7178
Layout.fillWidth: true

qt6/src/qml/LicenseDialog.qml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ DialogWindow {
1818
property alias licensePath: licenseProvider.path
1919

2020
header: D.DialogTitleBar {
21-
title: control.title
2221
leftContent: Item {
2322
width: 32
2423
D.IconButton {

0 commit comments

Comments
 (0)