Hide the uploads and downloads by default, and make the mode switcher hide before showing, to prevent weird window resizing

This commit is contained in:
Micah Lee 2018-09-28 13:18:18 -07:00
parent fc1902c1ee
commit ddcbed451c
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
3 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,6 @@ class OnionShareGui(QtWidgets.QMainWindow):
self.setWindowTitle('OnionShare')
self.setWindowIcon(QtGui.QIcon(self.common.get_resource_path('images/logo.png')))
self.setMinimumWidth(850)
# Load settings
self.config = config
@ -194,8 +193,8 @@ class OnionShareGui(QtWidgets.QMainWindow):
self.share_mode_button.setStyleSheet(self.common.css['mode_switcher_selected_style'])
self.receive_mode_button.setStyleSheet(self.common.css['mode_switcher_unselected_style'])
self.share_mode.show()
self.receive_mode.hide()
self.share_mode.show()
else:
self.share_mode_button.setStyleSheet(self.common.css['mode_switcher_unselected_style'])
self.receive_mode_button.setStyleSheet(self.common.css['mode_switcher_selected_style'])

View File

@ -48,6 +48,7 @@ class ReceiveMode(Mode):
# Uploads
self.uploads = Uploads(self.common)
self.uploads.hide()
self.uploads_in_progress = 0
self.uploads_completed = 0
self.new_upload = False # For scrolling to the bottom of the uploads list

View File

@ -72,6 +72,7 @@ class ShareMode(Mode):
# Downloads
self.downloads = Downloads(self.common)
self.downloads.hide()
self.downloads_in_progress = 0
self.downloads_completed = 0
@ -96,7 +97,6 @@ class ShareMode(Mode):
self.info_widget = QtWidgets.QWidget()
self.info_widget.setLayout(self.info_layout)
self.info_widget.hide()
# Primary action layout
self.primary_action_layout.addWidget(self.filesize_warning)