mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-15 04:42:18 -04:00
Increase minimum window with to 460, and store it in a variable to stop repeating myself
This commit is contained in:
parent
f9568caf81
commit
cae9ca4b72
4 changed files with 7 additions and 5 deletions
|
@ -45,6 +45,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||
|
||||
self.common = common
|
||||
self.common.log('OnionShareGui', '__init__')
|
||||
self.common.min_window_width = 460
|
||||
|
||||
self.onion = onion
|
||||
self.qtapp = qtapp
|
||||
|
@ -169,7 +170,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||
self.show()
|
||||
|
||||
# Adjust window size, to start with a minimum window width
|
||||
self.adjust_size(450)
|
||||
self.adjust_size(self.common.min_window_width)
|
||||
|
||||
# The server isn't active yet
|
||||
self.set_server_active(False)
|
||||
|
@ -474,6 +475,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||
|
||||
# Adjust sizes of each mode
|
||||
for mode in [self.share_mode, self.receive_mode]:
|
||||
self.qtapp.processEvents()
|
||||
adjust_size_widget(mode)
|
||||
|
||||
# Adjust window size
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue