mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
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:
parent
fc1902c1ee
commit
ddcbed451c
@ -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'])
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user