mirror of
https://github.com/onionshare/onionshare.git
synced 2025-08-22 04:39:30 -04:00
wrap progress bar
This commit is contained in:
parent
b2858de6ee
commit
89aa0d6415
2 changed files with 12 additions and 3 deletions
|
@ -103,7 +103,7 @@ class Downloads(QtWidgets.QVBoxLayout):
|
||||||
# add it to the list
|
# add it to the list
|
||||||
download = Download(download_id, total_bytes)
|
download = Download(download_id, total_bytes)
|
||||||
self.downloads[download_id] = download
|
self.downloads[download_id] = download
|
||||||
self.addWidget(download.progress_bar)
|
self.insertWidget(-1, download.progress_bar)
|
||||||
|
|
||||||
def update_download(self, download_id, downloaded_bytes):
|
def update_download(self, download_id, downloaded_bytes):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -112,10 +112,19 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
||||||
|
|
||||||
# main layout
|
# main layout
|
||||||
self.layout = QtWidgets.QVBoxLayout()
|
self.layout = QtWidgets.QVBoxLayout()
|
||||||
|
|
||||||
|
self.downloads_layout = QtWidgets.QGroupBox()
|
||||||
|
self.downloads_layout.setLayout(self.downloads)
|
||||||
|
self.downloads_layout_container = QtWidgets.QScrollArea()
|
||||||
|
self.downloads_layout_container.setWidget(self.downloads_layout)
|
||||||
|
self.downloads_layout_container.setWidgetResizable(True)
|
||||||
|
self.downloads_layout_container.setFixedHeight(80)
|
||||||
|
self.vbar = self.downloads_layout_container.verticalScrollBar()
|
||||||
|
|
||||||
self.layout.addLayout(self.file_selection)
|
self.layout.addLayout(self.file_selection)
|
||||||
self.layout.addLayout(self.server_status)
|
self.layout.addLayout(self.server_status)
|
||||||
self.layout.addWidget(self.filesize_warning)
|
self.layout.addWidget(self.filesize_warning)
|
||||||
self.layout.addLayout(self.downloads)
|
self.layout.addWidget(self.downloads_layout_container)
|
||||||
self.layout.addLayout(self.options)
|
self.layout.addLayout(self.options)
|
||||||
central_widget = QtWidgets.QWidget()
|
central_widget = QtWidgets.QWidget()
|
||||||
central_widget.setLayout(self.layout)
|
central_widget.setLayout(self.layout)
|
||||||
|
@ -210,7 +219,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
||||||
events.append(r)
|
events.append(r)
|
||||||
except web.queue.Empty:
|
except web.queue.Empty:
|
||||||
done = True
|
done = True
|
||||||
|
self.vbar.setValue(self.vbar.maximum())
|
||||||
for event in events:
|
for event in events:
|
||||||
if event["type"] == web.REQUEST_LOAD:
|
if event["type"] == web.REQUEST_LOAD:
|
||||||
self.status_bar.showMessage(strings._('download_page_loaded', True))
|
self.status_bar.showMessage(strings._('download_page_loaded', True))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue