Resize the window when adding new files

This commit is contained in:
Micah Lee 2018-02-05 09:33:31 -08:00
parent fd089f8803
commit 5328a6f7f6
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -56,6 +56,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
self.setWindowTitle('OnionShare') self.setWindowTitle('OnionShare')
self.setWindowIcon(QtGui.QIcon(common.get_resource_path('images/logo.png'))) self.setWindowIcon(QtGui.QIcon(common.get_resource_path('images/logo.png')))
self.setMinimumWidth(300)
# Load settings # Load settings
self.config = config self.config = config
@ -168,6 +169,10 @@ class OnionShareGui(QtWidgets.QMainWindow):
self.check_for_updates() self.check_for_updates()
def update_primary_action(self): def update_primary_action(self):
# Resize window
self.resize(self.sizeHint())
# Show or hide primary action layout
if self.file_selection.file_list.count() > 0: if self.file_selection.file_list.count() > 0:
self.primary_action.show() self.primary_action.show()
else: else: