Repository: psychopy/psychopy

Issue:
Psychopy Updates dialog elements are not fully displayed
- OS:windows 10 21H2
- Screen Resolution: 3000*2000
- Version:2022.1.2

Due to the unreasonable layout, the input box of "Browse file" is not fully displayed. As shown below:
![Snipaste_2022-03-27_10-55-49](https://user-images.githubusercontent.com/10348402/160266181-f372b6d3-44ce-4d8d-a895-414698f001fd.png)

May be related to this border parameter:https://github.com/psychopy/psychopy/blob/a779a71db4d031668f2ac2f15a893a1eceae5809/psychopy/app/connections/updates.py#L317


Discussion:

Resolving patch:
diff --git a/psychopy/app/connections/updates.py b/psychopy/app/connections/updates.py
--- a/psychopy/app/connections/updates.py
+++ b/psychopy/app/connections/updates.py
@@ -272,10 +272,12 @@ def __init__(self, parent, ID, app):
             self.latest = app.updater.latest
         self.runningVersion = app.updater.runningVersion
         wx.Dialog.__init__(self, parent, ID,
-                           title=_translate('PsychoPy Updates'),
-                           size=(100, 200))
+                           title=_translate('PsychoPy Updates'))
 
+        borderSizer = wx.BoxSizer(wx.VERTICAL)
         mainSizer = wx.BoxSizer(wx.VERTICAL)
+        self.SetSizer(borderSizer)
+        borderSizer.Add(mainSizer, border=12, proportion=1, flag=wx.ALL | wx.EXPAND)
         # set the actual content of status msg later in self.updateStatus()
         self.statusMessage = wx.StaticText(
             self, -1, "msg", style=wx.ALIGN_CENTER)
@@ -285,7 +287,7 @@ def __init__(self, parent, ID, app):
         self.useLatestBtn = wx.RadioButton(self, -1, msg,
                                            style=wx.RB_GROUP)
         self.Bind(wx.EVT_RADIOBUTTON, self.onRadioSelect, self.useLatestBtn)
-        self.progressBar = wx.Gauge(self, -1, 100, size=(250, 25))
+        self.progressBar = wx.Gauge(self, -1, 100, size=(250, 36))
         mainSizer.Add(self.useLatestBtn,
                       flag=wx.ALIGN_LEFT | wx.ALL, border=5)
         mainSizer.Add(self.progressBar, flag=wx.EXPAND | wx.ALL, border=5)
@@ -295,11 +297,10 @@ def __init__(self, parent, ID, app):
         self.useZipBtn = wx.RadioButton(self, -1, msg)
         self.Bind(wx.EVT_RADIOBUTTON, self.onRadioSelect, self.useZipBtn)
         self.fileBrowseCtrl = wx.lib.filebrowsebutton.FileBrowseButton(
-            self, -1, size=(450, -1), changeCallback=self.onFileBrowse,
+            self, -1, size=(450, 48), changeCallback=self.onFileBrowse,
             fileMask='*.zip')
         mainSizer.Add(self.useZipBtn, flag=wx.ALIGN_LEFT | wx.ALL, border=5)
-        mainSizer.Add(self.fileBrowseCtrl,
-                      flag=wx.ALIGN_LEFT | wx.ALL, border=5)
+        mainSizer.Add(self.fileBrowseCtrl, flag=wx.ALIGN_LEFT | wx.ALL, border=5)
         # ctrls for buttons (install/cancel)
         self.installBtn = wx.Button(self, -1, _translate('Install'))
         self.Bind(wx.EVT_BUTTON, self.onInstall, self.installBtn)
@@ -314,10 +315,11 @@ def __init__(self, parent, ID, app):
             btns = [self.cancelBtn, self.installBtn]
         btnSizer.Add(btns[0], 0, flag=wx.LEFT, border=5)
         btnSizer.Add(btns[1], 0, flag=wx.LEFT, border=5)
-        mainSizer.Add(btnSizer, flag=wx.ALL | wx.EXPAND, border=15)
+        mainSizer.AddStretchSpacer()
+        mainSizer.Add(btnSizer, flag=wx.ALL | wx.EXPAND, border=5)
 
-        self.SetSizerAndFit(mainSizer)
-        self.SetAutoLayout(True)
+        self.Layout()
+        self.Fit()
 
         # positioning and sizing
         self.updateStatus()
@@ -370,6 +372,7 @@ def updateStatus(self):
         else:
             self.currentSelection = self.useLatestBtn
             self.useLatestBtn.SetValue(True)
+        self.Layout()
         self.Fit()
         # this will enable/disable additional controls for the above:
         self.onRadioSelect()


Test patch: