Repository: psychopy/psychopy

Issue:
[Bug] Text box GUI fonts are black in dark theme - barely visible
### PsychoPy Version

2023.2.0

### What OS are your PsychoPy running on?

Linux-based systems

### Bug Description

When using a dark theme in KDE/Kubuntu, some of the fonts of the input text boxes are barely visible as the font color is black. I found no option to

![image](https://github.com/psychopy/psychopy/assets/14980558/1c682575-6c4c-4259-8332-cde3cfcf2109)


### Expected Behaviour

All text box fonts are using the current theme i.e. in this case a light font

### Steps to Reproduce

1. Use KDE/Kubuntu with any dark window manager theme
2. Set PsychoPyDark theme

### Additional context

I'm using

- KDE plasma 5.27.4 with X11 and Qt 5.15.8
- Breeze Dark as system theme
- Kubuntu 23.04


Discussion:

Resolving patch:
diff --git a/psychopy/app/builder/dialogs/__init__.py b/psychopy/app/builder/dialogs/__init__.py
--- a/psychopy/app/builder/dialogs/__init__.py
+++ b/psychopy/app/builder/dialogs/__init__.py
@@ -162,8 +162,7 @@ def __init__(self, dlg, label, param, parent, fieldName,
                 valType=param.valType,
                 choices=param.allowedVals, 
                 labels=param.allowedLabels,
-                fieldName=fieldName, 
-                size=wx.Size(int(self.valueWidth), 24))
+                fieldName=fieldName)
         elif param.inputType == 'multiChoice':
             self.valueCtrl = paramCtrls.MultiChoiceCtrl(
                 parent, 
@@ -490,7 +489,7 @@ def __init__(self, parent, params):
                 localizedChoices = list(map(_translate, param.allowedVals or [param.val]))
                 self.ctrls[name] = wx.Choice(parent,
                                              choices=localizedChoices,
-                                             size=wx.Size(96, 24))
+                                             size=wx.Size(96, -1))
                 self.ctrls[name]._choices = copy.copy(param.allowedVals)
                 self.ctrls[name].SetSelection(param.allowedVals.index(str(param.val)))
                 self.Add(self.ctrls[name], (0, 1), border=6, flag=wx.EXPAND | wx.TOP)
diff --git a/psychopy/app/builder/dialogs/paramCtrls.py b/psychopy/app/builder/dialogs/paramCtrls.py
--- a/psychopy/app/builder/dialogs/paramCtrls.py
+++ b/psychopy/app/builder/dialogs/paramCtrls.py
@@ -57,7 +57,7 @@ def showValid(self, valid):
             return
 
         if valid:
-            self.SetForegroundColour(wx.Colour(0, 0, 0))
+            self.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNTEXT))
         else:
             self.SetForegroundColour(wx.Colour(1, 0, 0))
 
@@ -331,12 +331,12 @@ def spin(self, evt):
 class ChoiceCtrl(wx.Choice, _ValidatorMixin, _HideMixin):
     def __init__(self, parent, valType,
                  val="", choices=[], labels=[], fieldName="",
-                 size=wx.Size(-1, 24)):
+                 size=wx.Size(-1, -1)):
         self._choices = choices
         self._labels = labels
         # Create choice ctrl from labels
         wx.Choice.__init__(self)
-        self.Create(parent, -1, size=size, name=fieldName)
+        self.Create(parent, -1, name=fieldName)
         self.populate()
         self.valType = valType
         self.SetStringSelection(val)


Test patch:
diff --git a/psychopy/tests/test_visual/test_all_stimuli.py b/psychopy/tests/test_visual/test_all_stimuli.py
--- a/psychopy/tests/test_visual/test_all_stimuli.py
+++ b/psychopy/tests/test_visual/test_all_stimuli.py
@@ -425,36 +425,6 @@ def test_shape(self):
         assert 'Shape' in "{}".format(shape)  # check that str(xxx) is working
         utils.compareScreenshot('shape2_2_%s.png' %(self.contextName), win, crit=12.5)
 
-    def test_radial(self):
-        win = self.win
-        #using init
-        wedge = visual.RadialStim(win, tex='sqrXsqr', color=1, size=2* self.scaleFactor,
-            visibleWedge=[0, 45], radialCycles=2, angularCycles=2, interpolate=False)
-        wedge.draw()
-        thresh = 15  # there are often a slight interpolation differences
-        if win.winType != 'pygame':  # pygame definitely gets radialstim wrong!
-            utils.compareScreenshot('wedge1_%s.png' %(self.contextName),
-                                    win, crit=thresh)
-        win.flip()#AFTER compare screenshot
-
-        #using .set()
-        wedge.mask = 'gauss'
-        wedge.size = 3 * self.scaleFactor
-        wedge.angularCycles = 3
-        wedge.radialCycles = 3
-        wedge.ori = 180
-        wedge.contrast = 0.8
-        wedge.opacity = 0.8
-        wedge.radialPhase += 0.1
-        wedge.angularPhase = 0.1
-        wedge.draw()
-        "{}".format(wedge) #check that str(xxx) is working
-        if win.winType != 'pygame': # pygame gets this wrong:
-            utils.compareScreenshot('wedge2_%s.png' %(self.contextName),
-                                    win, crit=thresh)
-        else:
-            pytest.skip("Pygame fails to render RadialStim properly :-/")
-
     def test_simpleimage(self):
         win = self.win
         if win.useRetina: