From 499f7b16381fb2f1a8ec3bb50d7128f9c0062d9a Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Wed, 19 Sep 2018 19:00:12 -0700 Subject: [PATCH] Always show uploads and downloads --- onionshare_gui/mode.py | 4 ++++ onionshare_gui/receive_mode/__init__.py | 3 ++- onionshare_gui/receive_mode/uploads.py | 1 - onionshare_gui/share_mode/__init__.py | 1 + onionshare_gui/share_mode/downloads.py | 1 - 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/onionshare_gui/mode.py b/onionshare_gui/mode.py index 7ae8d315..4c21de76 100644 --- a/onionshare_gui/mode.py +++ b/onionshare_gui/mode.py @@ -78,6 +78,10 @@ class Mode(QtWidgets.QWidget): # Layout self.layout = QtWidgets.QVBoxLayout() self.layout.addWidget(self.primary_action) + # Hack to allow a minimum width on self.layout + min_width_widget = QtWidgets.QWidget() + min_width_widget.setMinimumWidth(450) + self.layout.addWidget(min_width_widget) self.horizontal_layout_wrapper = QtWidgets.QHBoxLayout() self.horizontal_layout_wrapper.addLayout(self.layout) diff --git a/onionshare_gui/receive_mode/__init__.py b/onionshare_gui/receive_mode/__init__.py index d414f3b0..0f3105e1 100644 --- a/onionshare_gui/receive_mode/__init__.py +++ b/onionshare_gui/receive_mode/__init__.py @@ -46,7 +46,7 @@ class ReceiveMode(Mode): self.server_status.web = self.web self.server_status.update() - # Downloads + # Uploads self.uploads = Uploads(self.common) self.uploads_in_progress = 0 self.uploads_completed = 0 @@ -86,6 +86,7 @@ class ReceiveMode(Mode): # Layout self.layout.insertWidget(0, self.receive_info) self.layout.insertWidget(0, self.info_widget) + self.horizontal_layout_wrapper.addWidget(self.uploads) def get_stop_server_shutdown_timeout_text(self): """ diff --git a/onionshare_gui/receive_mode/uploads.py b/onionshare_gui/receive_mode/uploads.py index f77cdbf4..48574cc7 100644 --- a/onionshare_gui/receive_mode/uploads.py +++ b/onionshare_gui/receive_mode/uploads.py @@ -222,7 +222,6 @@ class Uploads(QtWidgets.QScrollArea): self.setWindowTitle(strings._('gui_uploads', True)) self.setWidgetResizable(True) - self.setMaximumHeight(600) self.setMinimumHeight(150) self.setMinimumWidth(350) self.setWindowIcon(QtGui.QIcon(common.get_resource_path('images/logo.png'))) diff --git a/onionshare_gui/share_mode/__init__.py b/onionshare_gui/share_mode/__init__.py index 65ce1d52..28881220 100644 --- a/onionshare_gui/share_mode/__init__.py +++ b/onionshare_gui/share_mode/__init__.py @@ -116,6 +116,7 @@ class ShareMode(Mode): # Layout self.layout.insertLayout(0, self.file_selection) self.layout.insertWidget(0, self.info_widget) + self.horizontal_layout_wrapper.addWidget(self.downloads) # Always start with focus on file selection self.file_selection.setFocus() diff --git a/onionshare_gui/share_mode/downloads.py b/onionshare_gui/share_mode/downloads.py index 9aeef576..a34796f1 100644 --- a/onionshare_gui/share_mode/downloads.py +++ b/onionshare_gui/share_mode/downloads.py @@ -91,7 +91,6 @@ class Downloads(QtWidgets.QScrollArea): self.setWindowTitle(strings._('gui_downloads', True)) self.setWidgetResizable(True) - self.setMaximumHeight(600) self.setMinimumHeight(150) self.setMinimumWidth(350) self.setWindowIcon(QtGui.QIcon(common.get_resource_path('images/logo.png')))