Skip to content

Commit 935ba43

Browse files
committed
fix: remove redundant title label in dialog
1. Remove duplicated title Label from UpdateHistoryDialog since DialogWindow already displays the title in its title bar 2. Remove duplicated title Label from UpdateLogDialog for the same reason 3. Adjust layout constraints in UpdateLogDialog to properly fill content area without relying on fixed height Log: Remove redundant title labels from update history and log dialogs fix: 移除对话框中多余的标题标签 1. 移除 UpdateHistoryDialog 中重复的标题 Label,DialogWindow 标题栏已显示标题 2. 同理移除 UpdateLogDialog 中重复的标题 Label 3. 调整 UpdateLogDialog 布局约束,不再依赖固定高度 Log: 移除更新历史和更新日志对话框中多余的标题标签 PMS: BUG-362237
1 parent 63b0580 commit 935ba43

2 files changed

Lines changed: 4 additions & 21 deletions

File tree

src/dcc-update-plugin/qml/UpdateHistoryDialog.qml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2025 UnionTech Software Technology Co., Ltd.
1+
// SPDX-FileCopyrightText: 2025 - 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
@@ -22,14 +22,6 @@ D.DialogWindow {
2222
width: root.width// - DS.Style.dialogWindow.contentHMargin * 2
2323
spacing: 0
2424

25-
D.Label {
26-
Layout.alignment: Qt.AlignHCenter
27-
Layout.bottomMargin: 12
28-
text: title
29-
font: D.DTK.fontManager.t6
30-
color: D.DTK.themeType == D.ApplicationHelper.LightType ? Qt.rgba(0, 0, 0, 1) : Qt.rgba(1, 1, 1, 1)
31-
wrapMode: Text.WordWrap
32-
}
3325

3426
// 无更新历史时的提示
3527
Control {

src/dcc-update-plugin/qml/UpdateLogDialog.qml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import org.deepin.dcc 1.0
1111
D.DialogWindow {
1212
id: root
1313
width: 480
14-
height: 380
1514
icon: "preferences-system"
1615
modality: Qt.WindowModal
1716
title: qsTr("Update Log")
@@ -20,22 +19,13 @@ D.DialogWindow {
2019
signal exportBtnClicked()
2120

2221
ColumnLayout {
23-
anchors.fill: parent
22+
width: root.width - root.leftPadding - root.rightPadding
2423
spacing: 10
2524

26-
D.Label {
27-
id: titleLabel
28-
Layout.alignment: Qt.AlignHCenter
29-
text: title
30-
font: D.DTK.fontManager.t6
31-
color: D.DTK.themeType === D.ApplicationHelper.LightType ? Qt.rgba(0, 0, 0, 1) : Qt.rgba(1, 1, 1, 1)
32-
wrapMode: Text.WordWrap
33-
}
34-
3525
ScrollView {
3626
id: scrollView
3727
Layout.fillWidth: true
38-
Layout.preferredHeight: root.height - titleLabel.height - buttonRow.height - 80
28+
Layout.preferredHeight: 340 - DS.Style.dialogWindow.titleBarHeight - buttonRow.implicitHeight - DS.Style.dialogWindow.contentVMargin
3929
clip: true
4030

4131
background: Rectangle {
@@ -65,6 +55,7 @@ D.DialogWindow {
6555
// 按钮行
6656
RowLayout {
6757
id: buttonRow
58+
Layout.bottomMargin: DS.Style.dialogWindow.contentHMargin
6859
spacing: 10
6960

7061
Button {

0 commit comments

Comments
 (0)