diff options
-rwxr-xr-x | desktop/scripts/get-tor-osx.py | 2 | ||||
-rw-r--r-- | desktop/scripts/get-tor-windows.py | 2 | ||||
-rw-r--r-- | desktop/src/onionshare/tab/mode/chat_mode/__init__.py | 11 | ||||
-rw-r--r-- | desktop/src/onionshare/tab/mode/file_selection.py | 4 | ||||
-rw-r--r-- | desktop/src/onionshare/tab/mode/mode_settings_widget.py | 12 | ||||
-rw-r--r-- | desktop/src/onionshare/tab/mode/receive_mode/__init__.py | 10 | ||||
-rw-r--r-- | desktop/src/onionshare/tab/mode/share_mode/__init__.py | 6 | ||||
-rw-r--r-- | desktop/src/onionshare/tab/mode/website_mode/__init__.py | 6 | ||||
-rw-r--r-- | desktop/src/onionshare/widgets.py | 9 |
9 files changed, 34 insertions, 28 deletions
diff --git a/desktop/scripts/get-tor-osx.py b/desktop/scripts/get-tor-osx.py index 310acc27..f53174b2 100755 --- a/desktop/scripts/get-tor-osx.py +++ b/desktop/scripts/get-tor-osx.py @@ -34,7 +34,7 @@ import requests def main(): - dmg_url = "https://archive.torproject.org/tor-package-archive/torbrowser/10.0.16/TorBrowser-10.0.16-osx64_en-US.dmg" + dmg_url = "https://www.torproject.org/dist/torbrowser/10.0.16/TorBrowser-10.0.16-osx64_en-US.dmg" dmg_filename = "TorBrowser-10.0.16-osx64_en-US.dmg" expected_dmg_sha256 = ( "95bf37d642bd05e9ae4337c5ab9706990bbd98cc885e25ee8ae81b07c7653f0a" diff --git a/desktop/scripts/get-tor-windows.py b/desktop/scripts/get-tor-windows.py index a9126e9d..93ae4020 100644 --- a/desktop/scripts/get-tor-windows.py +++ b/desktop/scripts/get-tor-windows.py @@ -33,7 +33,7 @@ import requests def main(): - exe_url = "https://archive.torproject.org/tor-package-archive/torbrowser/10.0.16/torbrowser-install-10.0.16_en-US.exe" + exe_url = "https://www.torproject.org/dist/torbrowser/10.0.16/torbrowser-install-win64-10.0.16_en-US.exe" exe_filename = "torbrowser-install-10.0.16_en-US.exe" expected_exe_sha256 = ( "1f93d756b4aee1b2df7d85c8d58b626b0d38d89c974c0a02f324ff51f5b23ee1" diff --git a/desktop/src/onionshare/tab/mode/chat_mode/__init__.py b/desktop/src/onionshare/tab/mode/chat_mode/__init__.py index 7f32aebb..fe3e69f1 100644 --- a/desktop/src/onionshare/tab/mode/chat_mode/__init__.py +++ b/desktop/src/onionshare/tab/mode/chat_mode/__init__.py @@ -24,7 +24,7 @@ from onionshare_cli.web import Web from .. import Mode from .... import strings -from ....widgets import MinimumWidthWidget +from ....widgets import MinimumSizeWidget from ....gui_common import GuiCommon @@ -82,17 +82,16 @@ class ChatMode(Mode): # Top bar top_bar_layout = QtWidgets.QHBoxLayout() - top_bar_layout.addStretch() + # Add space at the top, same height as the toggle history bar in other modes + top_bar_layout.addWidget(MinimumSizeWidget(0, 30)) # Main layout self.main_layout = QtWidgets.QVBoxLayout() self.main_layout.addLayout(top_bar_layout) - self.main_layout.addStretch() self.main_layout.addWidget(header_label) - self.main_layout.addWidget(self.primary_action) + self.main_layout.addWidget(self.primary_action, stretch=1) self.main_layout.addWidget(self.server_status) - self.main_layout.addStretch() - self.main_layout.addWidget(MinimumWidthWidget(700)) + self.main_layout.addWidget(MinimumSizeWidget(700, 0)) # Column layout self.column_layout = QtWidgets.QHBoxLayout() diff --git a/desktop/src/onionshare/tab/mode/file_selection.py b/desktop/src/onionshare/tab/mode/file_selection.py index e9604ec5..302f07b9 100644 --- a/desktop/src/onionshare/tab/mode/file_selection.py +++ b/desktop/src/onionshare/tab/mode/file_selection.py @@ -72,8 +72,8 @@ class DropHereWidget(QtWidgets.QWidget): def resize(self, w, h): self.setGeometry(0, 0, w, h) self.image_label.setGeometry(0, 0, w, h - 100) - self.header_label.setGeometry(0, 310, w, h - 380) - self.text_label.setGeometry(0, 360, w, h - 400) + self.header_label.setGeometry(0, 290, w, h - 360) + self.text_label.setGeometry(0, 340, w, h - 380) class DropCountLabel(QtWidgets.QLabel): diff --git a/desktop/src/onionshare/tab/mode/mode_settings_widget.py b/desktop/src/onionshare/tab/mode/mode_settings_widget.py index 98a6a01a..9f55dbaf 100644 --- a/desktop/src/onionshare/tab/mode/mode_settings_widget.py +++ b/desktop/src/onionshare/tab/mode/mode_settings_widget.py @@ -23,7 +23,7 @@ from PySide2 import QtCore, QtWidgets from ... import strings -class ModeSettingsWidget(QtWidgets.QWidget): +class ModeSettingsWidget(QtWidgets.QScrollArea): """ All of the common settings for each mode are in this widget """ @@ -177,7 +177,15 @@ class ModeSettingsWidget(QtWidgets.QWidget): layout.addWidget(self.public_checkbox) layout.addWidget(self.advanced_widget) layout.addWidget(self.toggle_advanced_button) - self.setLayout(layout) + layout.addStretch() + main_widget = QtWidgets.QWidget() + main_widget.setLayout(layout) + + self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) + self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded) + self.setWidgetResizable(True) + self.setFrameShape(QtWidgets.QFrame.NoFrame) + self.setWidget(main_widget) self.update_ui() diff --git a/desktop/src/onionshare/tab/mode/receive_mode/__init__.py b/desktop/src/onionshare/tab/mode/receive_mode/__init__.py index 4dd2980c..d07b5ffc 100644 --- a/desktop/src/onionshare/tab/mode/receive_mode/__init__.py +++ b/desktop/src/onionshare/tab/mode/receive_mode/__init__.py @@ -26,7 +26,7 @@ from onionshare_cli.web import Web from ..history import History, ToggleHistory, ReceiveHistoryItem from .. import Mode from .... import strings -from ....widgets import MinimumWidthWidget, Alert +from ....widgets import MinimumSizeWidget, Alert from ....gui_common import GuiCommon @@ -182,8 +182,8 @@ class ReceiveMode(Mode): self.main_layout = QtWidgets.QVBoxLayout() self.main_layout.addWidget(header_label) self.main_layout.addWidget(receive_warning) - self.main_layout.addWidget(self.primary_action) - self.main_layout.addWidget(MinimumWidthWidget(525)) + self.main_layout.addWidget(self.primary_action, stretch=1) + self.main_layout.addWidget(MinimumSizeWidget(525, 0)) # Row layout content_row = QtWidgets.QHBoxLayout() @@ -191,10 +191,8 @@ class ReceiveMode(Mode): content_row.addWidget(self.image) row_layout = QtWidgets.QVBoxLayout() row_layout.addLayout(top_bar_layout) - row_layout.addStretch() - row_layout.addLayout(content_row) + row_layout.addLayout(content_row, stretch=1) row_layout.addWidget(self.server_status) - row_layout.addStretch() # Column layout self.column_layout = QtWidgets.QHBoxLayout() diff --git a/desktop/src/onionshare/tab/mode/share_mode/__init__.py b/desktop/src/onionshare/tab/mode/share_mode/__init__.py index 676d34af..4056d92e 100644 --- a/desktop/src/onionshare/tab/mode/share_mode/__init__.py +++ b/desktop/src/onionshare/tab/mode/share_mode/__init__.py @@ -29,7 +29,7 @@ from .. import Mode from ..file_selection import FileSelection from ..history import History, ToggleHistory, ShareHistoryItem from .... import strings -from ....widgets import MinimumWidthWidget +from ....widgets import MinimumSizeWidget from ....gui_common import GuiCommon @@ -160,9 +160,9 @@ class ShareMode(Mode): self.main_layout = QtWidgets.QVBoxLayout() self.main_layout.addLayout(top_bar_layout) self.main_layout.addLayout(self.file_selection) - self.main_layout.addWidget(self.primary_action) + self.main_layout.addWidget(self.primary_action, stretch=1) self.main_layout.addWidget(self.server_status) - self.main_layout.addWidget(MinimumWidthWidget(700)) + self.main_layout.addWidget(MinimumSizeWidget(700, 0)) # Column layout self.column_layout = QtWidgets.QHBoxLayout() diff --git a/desktop/src/onionshare/tab/mode/website_mode/__init__.py b/desktop/src/onionshare/tab/mode/website_mode/__init__.py index 10caff51..577ea28e 100644 --- a/desktop/src/onionshare/tab/mode/website_mode/__init__.py +++ b/desktop/src/onionshare/tab/mode/website_mode/__init__.py @@ -29,7 +29,7 @@ from .. import Mode from ..file_selection import FileSelection from ..history import History, ToggleHistory from .... import strings -from ....widgets import MinimumWidthWidget +from ....widgets import MinimumSizeWidget from ....gui_common import GuiCommon @@ -158,9 +158,9 @@ class WebsiteMode(Mode): self.main_layout = QtWidgets.QVBoxLayout() self.main_layout.addLayout(top_bar_layout) self.main_layout.addLayout(self.file_selection) - self.main_layout.addWidget(self.primary_action) + self.main_layout.addWidget(self.primary_action, stretch=1) self.main_layout.addWidget(self.server_status) - self.main_layout.addWidget(MinimumWidthWidget(700)) + self.main_layout.addWidget(MinimumSizeWidget(700, 0)) # Column layout self.column_layout = QtWidgets.QHBoxLayout() diff --git a/desktop/src/onionshare/widgets.py b/desktop/src/onionshare/widgets.py index a1880a2e..c239d03a 100644 --- a/desktop/src/onionshare/widgets.py +++ b/desktop/src/onionshare/widgets.py @@ -84,14 +84,15 @@ class AddFileDialog(QtWidgets.QFileDialog): QtWidgets.QDialog.accept(self) -class MinimumWidthWidget(QtWidgets.QWidget): +class MinimumSizeWidget(QtWidgets.QWidget): """ - An empty widget with a minimum width, just to force layouts to behave + An empty widget with a minimum width and height, just to force layouts to behave """ - def __init__(self, width): - super(MinimumWidthWidget, self).__init__() + def __init__(self, width, height): + super(MinimumSizeWidget, self).__init__() self.setMinimumWidth(width) + self.setMinimumHeight(height) class Image(qrcode.image.base.BaseImage): |