60
61
Component.onCompleted: internal.connectToDownloadObject()
61
62
onDownloadManagerChanged: internal.connectToDownloadObject()
66
verticalCenter: parent.verticalCenter
68
leftMargin: units.gu(2)
70
rightMargin: units.gu(2)
68
SlotsLayout.position: SlotsLayout.Leading
77
anchors.verticalCenter: parent.verticalCenter
78
anchors.verticalCenterOffset: downloadDelegate.incomplete ? -units.gu(1) : 0
85
76
fillMode: Image.PreserveAspectFit
86
sourceSize.width: parent.width
87
sourceSize.height: parent.height
88
anchors.verticalCenter: parent.verticalCenter
77
sourceSize.width: width
78
sourceSize.height: height
94
83
anchors.fill: parent
95
84
anchors.margins: units.gu(0.2)
96
source: "image://theme/%1".arg(name != "" ? name : "save")
85
source: "image://theme/%1".arg(downloadDelegate.icon || "save")
97
86
visible: thumbimage.status !== Image.Ready
104
anchors.top: iconContainer.top
105
anchors.left: iconContainer.right
106
anchors.leftMargin: units.gu(2)
107
anchors.right: parent.right
111
width: parent.width - cancelColumn.width
112
height: parent.height
118
elide: Text.ElideRight
126
elide: Text.ElideRight
131
height: error.visible ? units.gu(1) : units.gu(2)
133
visible: downloadDelegate.incomplete
138
visible: incomplete && download === undefined || errorMessage !== ""
146
anchors.verticalCenter: parent.verticalCenter
147
name: "dialog-warning-symbolic"
148
color: theme.palette.normal.negative
152
width: parent.width - errorIcon.width
153
anchors.left: errorIcon.right
154
anchors.leftMargin: units.gu(1)
155
anchors.verticalCenter: errorIcon.verticalCenter
157
color: theme.palette.normal.negative
158
text: errorMessage !== "" ? errorMessage
159
: (incomplete && download === undefined) ? i18n.tr("Download failed")
161
elide: Text.ElideRight
165
IndeterminateProgressBar {
168
height: units.gu(0.5)
169
visible: downloadDelegate.incomplete && !error.visible
170
progress: downloadDelegate.progress
171
// Work around UDM bug #1450144
172
indeterminateProgress: downloadDelegate.progress < 0 || downloadDelegate.progress > 100
179
anchors.top: detailsColumn.top
180
anchors.left: detailsColumn.right
181
anchors.leftMargin: units.gu(2)
182
width: downloadDelegate.incomplete && !error.visible ? cancelButton.width + units.gu(2) : 0
185
visible: downloadDelegate.incomplete && !error.visible
187
text: i18n.tr("Cancel")
197
visible: !progressBar.indeterminateProgress && downloadDelegate.incomplete
199
&& !downloadDelegate.paused
200
width: cancelButton.width
201
horizontalAlignment: Text.AlignHCenter
203
text: progressBar.progress + "%"
207
visible: downloadDelegate.paused
208
text: i18n.tr("Resume")
209
width: cancelButton.width
221
leadingActions: error.visible || !downloadDelegate.incomplete ? deleteActionList : null
96
elide: Text.ElideRight
107
elide: Text.ElideRight
115
height: error.visible ? units.gu(1) : units.gu(2)
125
visible: (incomplete && (download === undefined)) || errorMessage
136
anchors.verticalCenter: parent.verticalCenter
137
name: "dialog-warning-symbolic"
138
color: theme.palette.normal.negative
143
left: errorIcon.right
144
leftMargin: units.gu(1)
146
verticalCenter: parent.verticalCenter
149
color: theme.palette.normal.negative
150
text: errorMessage ||
151
((incomplete && download === undefined) ? i18n.tr("Download failed") : "")
152
elide: Text.ElideRight
156
IndeterminateProgressBar {
162
height: units.gu(0.5)
163
visible: incomplete && !error.visible
164
progress: downloadDelegate.progress
165
// Work around UDM bug #1450144
166
indeterminateProgress: progress < 0 || progress > 100
171
SlotsLayout.position: SlotsLayout.Trailing
173
width: (incomplete && !error.visible) ? cancelButton.width : 0
177
visible: incomplete && !error.visible
178
text: i18n.tr("Cancel")
188
visible: !progressBar.indeterminateProgress && incomplete
189
&& !error.visible && !paused
190
width: cancelButton.width
191
horizontalAlignment: Text.AlignHCenter
193
// TRANSLATORS: %1 is the percentage of the download completed so far
194
text: i18n.tr("%1%").arg(progressBar.progress)
199
text: i18n.tr("Resume")
200
width: cancelButton.width
214
rightMargin: units.gu(2)
215
bottom: parent.bottom
216
bottomMargin: units.gu(1)
221
name: "private-browsing"
224
leadingActions: error.visible || !incomplete ? deleteActionList : null
223
226
ListItemActions {
224
227
id: deleteActionList