mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-13 00:09:38 -05:00
Make ModeSettingsWidget a scroll area, and adjust all the stretches
This commit is contained in:
parent
e3d0376b5a
commit
dc7b80e2ef
@ -87,11 +87,9 @@ class ChatMode(Mode):
|
||||
# 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))
|
||||
|
||||
# Column layout
|
||||
|
@ -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()
|
||||
|
||||
|
@ -182,7 +182,7 @@ 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(self.primary_action, stretch=1)
|
||||
self.main_layout.addWidget(MinimumWidthWidget(525))
|
||||
|
||||
# Row layout
|
||||
@ -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()
|
||||
|
@ -160,7 +160,7 @@ 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))
|
||||
|
||||
|
@ -158,7 +158,7 @@ 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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user