Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dcc-update-plugin/qml/UpdateControl.qml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ ColumnLayout {
Layout.alignment: Qt.AlignRight
Layout.rightMargin: isDownloading ? pauseIcon.width + stopIcon.width + progressCtl.spacing * 2 : 0
width: parent.width
text: processTitle + Math.floor(process.value * 100) + "%"
text: processTitle + " " + Math.floor(process.value * 100) + "%"
font: D.DTK.fontManager.t8
}
}
Expand Down
42 changes: 34 additions & 8 deletions src/dcc-update-plugin/qml/UpdateSelectDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import org.deepin.dcc 1.0
D.DialogWindow {
id: root
width: 360
height: 130
height: 150
icon: "preferences-system"
modality: Qt.WindowModal

Expand All @@ -20,9 +20,12 @@ D.DialogWindow {
signal upgradeShutdownBtnClicked()

ColumnLayout {
anchors.fill: parent
Label {
Layout.alignment: Qt.AlignHCenter
width: parent.width
height: 150 - DS.Style.dialogWindow.titleBarHeight

D.Label {
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
text: qsTr("The updates have been already downloaded. What do you want to do?")
}
Expand All @@ -33,26 +36,26 @@ D.DialogWindow {

RowLayout {
Layout.fillWidth: true
Layout.bottomMargin: 0
Layout.bottomMargin: 10
spacing: 10

D.Button {
ButtonWithToolTip {
text: qsTr("Silent Installation")
Layout.fillWidth: true
onClicked: {
root.silentBtnClicked()
}
}

D.Button {
ButtonWithToolTip {
text: qsTr("Update and Reboot")
Layout.fillWidth: true
onClicked: {
root.upgradeRebootBtnClicked()
}
}

D.Button {
ButtonWithToolTip {
text: qsTr("Update and Shut Down")
textColor: D.Palette {
normal {
Expand All @@ -65,6 +68,29 @@ D.DialogWindow {
root.upgradeShutdownBtnClicked()
}
}

component ButtonWithToolTip: D.Button {
id: customButton

contentItem: Text {
id: buttonText
text: customButton.text
font: customButton.font
color: customButton.D.ColorSelector.textColor
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
width: customButton.width
}

hoverEnabled: true

ToolTip {
visible: customButton.hovered && buttonText.truncated
delay: 500
text: customButton.text
}
}
}
}
}
3 changes: 0 additions & 3 deletions src/dcc-update-plugin/qml/UpdateSetting.qml
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,6 @@ DccObject {
}
}
onEditingFinished: {
if (lineEdit.showAlert) {
return
}
if (lineEdit.text.length === 0) {
lineEdit.text = dccData.model().downloadSpeedLimitSize
return
Expand Down