From ac9284f168be2f672bb2b1e63d07f4b50e7afe05 Mon Sep 17 00:00:00 2001
From: Ed Rogers <etr@orc.soton.ac.uk>
Date: Wed, 4 Apr 2018 20:59:45 +0200
Subject: [PATCH] Fix font of label and color of background

---
 HearingTestGUI.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/HearingTestGUI.py b/HearingTestGUI.py
index f5cd21e..36edae5 100644
--- a/HearingTestGUI.py
+++ b/HearingTestGUI.py
@@ -141,7 +141,9 @@ class TestWindow(QMainWindow):
         grid_layout = QGridLayout(self)
         central_widget.setLayout(grid_layout)
 
-        self.title = QLabel("Press any key to start...", self)
+        self.setStyleSheet("QMainWindow { background-color: black }")
+        self.title = QLabel("Press space bar to start...", self)
+        self.title.setStyleSheet("QLabel { background-color: black; color: white; font: 24pt}")
         self.title.setAlignment(QtCore.Qt.AlignCenter)
 
         self.log = QTextEdit()
@@ -165,6 +167,7 @@ class TestWindow(QMainWindow):
         if event.key() == Qt.Qt.Key_F:
             HearingTest.max_response_time = 0.01
             return
+        # TODO add slow mode
         if not self.test_running:
             if event.key() == Qt.Qt.Key_Escape:
                 self.close()
@@ -208,14 +211,12 @@ class TestWindow(QMainWindow):
         thresholds = thresholds.reshape(thresholds.shape[0], -1)  # convert to 2d
         with open('data.csv', 'ba') as file:
             np.savetxt(file, thresholds.T, fmt='%.2f', delimiter=',')
-        # TODO store test
         # TODO calculate score
-        # TODO display test
+        # TODO display score
         self.test = None
 
 
 def main():
-    print(sd.default.device['output'])
     device = sd.query_devices(sd.default.device['output'])
     fs = device['default_samplerate']
     length = 0.5
-- 
GitLab