[Pkg-privacy-commits] [onionshare] 01/256: wrap progress bar
Ulrike Uhlig
ulrike at moszumanska.debian.org
Fri May 26 12:53:00 UTC 2017
This is an automated email from the git hooks/post-receive script.
ulrike pushed a commit to branch master
in repository onionshare.
commit b1dd45a94b466bb017b1cab1f2e12abed5b820e3
Author: choltz95 <chesterholtz at gmail.com>
Date: Tue Aug 2 01:43:17 2016 -0400
wrap progress bar
---
onionshare_gui/downloads.py | 2 +-
onionshare_gui/onionshare_gui.py | 13 +++++++++++--
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/onionshare_gui/downloads.py b/onionshare_gui/downloads.py
index 265b9bf..7b6016c 100644
--- a/onionshare_gui/downloads.py
+++ b/onionshare_gui/downloads.py
@@ -103,7 +103,7 @@ class Downloads(QtWidgets.QVBoxLayout):
# add it to the list
download = Download(download_id, total_bytes)
self.downloads[download_id] = download
- self.addWidget(download.progress_bar)
+ self.insertWidget(-1, download.progress_bar)
def update_download(self, download_id, downloaded_bytes):
"""
diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py
index 1eb508b..bad561a 100644
--- a/onionshare_gui/onionshare_gui.py
+++ b/onionshare_gui/onionshare_gui.py
@@ -112,10 +112,19 @@ class OnionShareGui(QtWidgets.QMainWindow):
# main layout
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.server_status)
self.layout.addWidget(self.filesize_warning)
- self.layout.addLayout(self.downloads)
+ self.layout.addWidget(self.downloads_layout_container)
self.layout.addLayout(self.options)
central_widget = QtWidgets.QWidget()
central_widget.setLayout(self.layout)
@@ -210,7 +219,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
events.append(r)
except web.queue.Empty:
done = True
-
+ self.vbar.setValue(self.vbar.maximum())
for event in events:
if event["type"] == web.REQUEST_LOAD:
self.status_bar.showMessage(strings._('download_page_loaded', True))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionshare.git
More information about the Pkg-privacy-commits
mailing list