Repository: nvaccess/nvda

Issue:
Find dialog layout is missing spaces

### Steps to reproduce:

Open find dialog, e.g. in browse mode, with NVDA+Ctrl+F and have a look at it.

### Actual behavior:

The find dialog has a layout that misses the following spaces:

* No space between the "Type the text you wish to find" label and the corresponding field
* No space between the "Case sensitive" check box and the dialog edge
* No space between "OK"/"Cancel" buttons and the dialog's edge

This leads to an unusual design of the dialog. This is more difficult for visually impaired people to get visually the expected information from this dialog. E.g. difficulty to read the text to find in the edit box because it is not properly separated from the label.

### Expected behavior:

Add the spaces where required so that each element of the dialog is spaced one from another.

### System configuration
#### NVDA installed/portable/running from source:

All

#### NVDA version:
Alpha and 2019.2

#### Windows version:

Windows 10

#### Name and version of other software in use when reproducing the issue:

N/A

#### Other information about your system:

N/A
### Other questions
#### Does the issue still occur after restarting your PC?
Yes

#### Have you tried any other versions of NVDA? If so, please report their behaviors.
No, but remember this issue was already present on older versions.



Discussion:

Resolving patch:
diff --git a/source/cursorManager.py b/source/cursorManager.py
--- a/source/cursorManager.py
+++ b/source/cursorManager.py
@@ -14,6 +14,7 @@
 import baseObject
 import documentBase
 import gui
+from gui import guiHelper
 import sayAllHandler
 import review
 from scriptHandler import willSayAllResume
@@ -38,21 +39,16 @@ def __init__(self, parent, cursorManager, text, caseSensitivity):
 		# Have a copy of the active cursor manager, as this is needed later for finding text.
 		self.activeCursorManager = cursorManager
 		mainSizer = wx.BoxSizer(wx.VERTICAL)
-
-		findSizer = wx.BoxSizer(wx.HORIZONTAL)
+		sHelper = guiHelper.BoxSizerHelper(self, orientation=wx.VERTICAL)
 		# Translators: Dialog text for NvDA's find command.
-		textToFind = wx.StaticText(self, wx.ID_ANY, label=_("Type the text you wish to find"))
-		findSizer.Add(textToFind)
-		self.findTextField = wx.TextCtrl(self, wx.ID_ANY)
-		self.findTextField.SetValue(text)
-		findSizer.Add(self.findTextField)
-		mainSizer.Add(findSizer,border=20,flag=wx.LEFT|wx.RIGHT|wx.TOP)
+		findLabelText = _("Type the text you wish to find")
+		self.findTextField = sHelper.addLabeledControl(findLabelText, wx.TextCtrl, value=text)
 		# Translators: An option in find dialog to perform case-sensitive search.
 		self.caseSensitiveCheckBox=wx.CheckBox(self,wx.ID_ANY,label=_("Case &sensitive"))
 		self.caseSensitiveCheckBox.SetValue(caseSensitivity)
-		mainSizer.Add(self.caseSensitiveCheckBox,border=10,flag=wx.BOTTOM)
-
-		mainSizer.Add(self.CreateButtonSizer(wx.OK|wx.CANCEL), flag=wx.ALIGN_RIGHT)
+		sHelper.addItem(self.caseSensitiveCheckBox)
+		sHelper.addDialogDismissButtons(self.CreateButtonSizer(wx.OK | wx.CANCEL))
+		mainSizer.Add(sHelper.sizer, border=guiHelper.BORDER_FOR_DIALOGS, flag=wx.ALL)
 		self.Bind(wx.EVT_BUTTON,self.onOk,id=wx.ID_OK)
 		self.Bind(wx.EVT_BUTTON,self.onCancel,id=wx.ID_CANCEL)
 		mainSizer.Fit(self)


Test patch: