From 87d29a9171a9ee31490aa04181a6e9a40a2132de Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Sun, 22 Apr 2018 17:15:15 -0700 Subject: [PATCH] Rearrange some widgets in the settings dialog, specifically move the bridge options above the test Tor settings button --- onionshare_gui/settings_dialog.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/onionshare_gui/settings_dialog.py b/onionshare_gui/settings_dialog.py index f60107af..c9009776 100644 --- a/onionshare_gui/settings_dialog.py +++ b/onionshare_gui/settings_dialog.py @@ -309,16 +309,6 @@ class SettingsDialog(QtWidgets.QDialog): connection_type_radio_group = QtWidgets.QGroupBox(strings._("gui_settings_connection_type_label", True)) connection_type_radio_group.setLayout(connection_type_radio_group_layout) - # Connection type layout - connection_type_group_layout = QtWidgets.QVBoxLayout() - connection_type_group_layout.addWidget(self.connection_type_control_port_extras) - connection_type_group_layout.addWidget(self.connection_type_socket_file_extras) - connection_type_group_layout.addWidget(self.connection_type_socks) - connection_type_group_layout.addWidget(self.authenticate_group) - connection_type_group_layout.addWidget(self.connection_type_test_button) - connection_type_group = QtWidgets.QGroupBox() - connection_type_group.setLayout(connection_type_group_layout) - # The Bridges options are not exclusive (enabling Bridges offers obfs4 or custom bridges) connection_type_bridges_radio_group_layout = QtWidgets.QVBoxLayout() connection_type_bridges_radio_group_layout.addWidget(self.bridges) @@ -326,6 +316,15 @@ class SettingsDialog(QtWidgets.QDialog): self.connection_type_bridges_radio_group.setLayout(connection_type_bridges_radio_group_layout) self.connection_type_bridges_radio_group.hide() + # Connection type layout + connection_type_layout = QtWidgets.QVBoxLayout() + connection_type_layout.addWidget(self.connection_type_control_port_extras) + connection_type_layout.addWidget(self.connection_type_socket_file_extras) + connection_type_layout.addWidget(self.connection_type_socks) + connection_type_layout.addWidget(self.authenticate_group) + connection_type_layout.addWidget(self.connection_type_bridges_radio_group) + connection_type_layout.addWidget(self.connection_type_test_button) + # Buttons self.save_button = QtWidgets.QPushButton(strings._('gui_settings_button_save', True)) self.save_button.clicked.connect(self.save_clicked) @@ -356,8 +355,7 @@ class SettingsDialog(QtWidgets.QDialog): right_col_layout = QtWidgets.QVBoxLayout() right_col_layout.addWidget(connection_type_radio_group) - right_col_layout.addWidget(connection_type_group) - right_col_layout.addWidget(self.connection_type_bridges_radio_group) + right_col_layout.addLayout(connection_type_layout) right_col_layout.addWidget(self.tor_status) right_col_layout.addStretch()