Skip to content

Commit 2626a48

Browse files
committed
fix: update control and list visibility improvements
1. Added updateListcheck property to control check icon visibility in UpdateControl 2. Reduced initAnimation dimensions from 32x32 to 24x24 for better UI proportion 3. Modified update title to show "Downloading updates..." during download state 4. Disabled check icons in success dialog by setting updateListcheck to false 5. Connected checkIconVisible property between UpdateControl and UpdateList components fix: 更新控制和列表可见性改进 1. 添加updateListcheck属性控制UpdateControl中的勾选图标可见性 2. 将initAnimation尺寸从32x32减小到24x24以获得更好的UI比例 3. 修改更新标题在下载状态时显示"正在下载更新..." 4. 通过设置updateListcheck为false在成功对话框中禁用勾选图标 5. 在UpdateControl和UpdateList组件之间连接checkIconVisible属性 pms: bug-321597
1 parent 2ce4fb1 commit 2626a48

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ ColumnLayout {
2121
property bool processState: false
2222
property bool busyState: false
2323
property bool updateListEnable: true
24+
property bool updateListcheck: true
2425
property bool isDownloading: false
2526
property bool isPauseOrNot: false
2627
property bool showLogButton: false
@@ -123,8 +124,8 @@ ColumnLayout {
123124
id: initAnimation
124125
running: initAnimation.visible
125126
visible: busyState
126-
implicitWidth: 32
127-
implicitHeight: 32
127+
implicitWidth: 24
128+
implicitHeight: 24
128129
}
129130

130131
ColumnLayout {
@@ -199,5 +200,6 @@ ColumnLayout {
199200
UpdateList {
200201
id: updatelistModel
201202
enabled: updateListEnable
203+
checkIconVisible: updateListcheck
202204
}
203205
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Rectangle {
1414
id: root
1515

1616
property alias model: repeater.model
17+
property bool checkIconVisible: true
1718

1819
color: "transparent"
1920
implicitHeight: layoutView.height
@@ -68,6 +69,7 @@ Rectangle {
6869
Layout.alignment: Qt.AlignRight
6970
checked: model.checked
7071
size: 18
72+
visible: checkIconVisible
7173

7274
onClicked: {
7375
repeater.model.setChecked(index, !model.checked)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ DccObject {
178178
updateTitle: qsTr("Update installation successful")
179179
updateTips: qsTr("To ensure proper functioning of your system and applications, please restart your computer after the update")
180180
btnActions: [ qsTr("Reboot now") ]
181+
updateListcheck: false
181182

182183
onBtnClicked: function(index, updateType) {
183184
dccData.work().reStart()
@@ -340,7 +341,7 @@ DccObject {
340341

341342
page: UpdateControl {
342343
updateListModels: dccData.model().preUpdatelistModel
343-
updateTitle: qsTr("Updates Available")
344+
updateTitle: !dccData.model().downloadWaiting ? qsTr("Updates Available") : qsTr("Downloading updates...")
344345
btnActions: [ qsTr("Download") ]
345346
updateTips: qsTr("Update size: ") + dccData.model().preUpdatelistModel.downloadSize
346347
busyState: dccData.model().downloadWaiting

0 commit comments

Comments
 (0)