diff --git a/macos/main/with-tobii.mm b/macos/main/with-tobii.mm index 5c65253a..62d76634 100644 --- a/macos/main/with-tobii.mm +++ b/macos/main/with-tobii.mm @@ -196,33 +196,36 @@ void attach(SubjectView::Observer *a) override { } void moveDotTo(WindowPoint point) override { + dot.hidden = YES; animate(dot, NSMakeRect(point.x * dot.superview.frame.size.width - dot.frame.size.width / 2, point.y * dot.superview.frame.size.height - dot.frame.size.height / 2, dot.frame.size.width, dot.frame.size.height), - 1.5, animationDelegate); + 0.5, animationDelegate); } void shrinkDot() override { + dot.hidden = NO; animate(dot, NSMakeRect(dot.frame.origin.x + (dot.frame.size.width - shrunkenDotDiameterPoints) / 2, dot.frame.origin.y + (dot.frame.size.height - shrunkenDotDiameterPoints) / 2, shrunkenDotDiameterPoints, shrunkenDotDiameterPoints), - 0.5, animationDelegate); + 2.0, animationDelegate); } void growDot() override { + dot.hidden = NO; animate(dot, NSMakeRect(dot.frame.origin.x + (dot.frame.size.width - normalDotDiameterPoints) / 2, dot.frame.origin.y + (dot.frame.size.height - normalDotDiameterPoints) / 2, normalDotDiameterPoints, normalDotDiameterPoints), - 0.5, animationDelegate); + 2.0, animationDelegate); } void show() override { [dot setHidden:NO]; } diff --git a/macos/main/with-tobii.swift b/macos/main/with-tobii.swift index 36f27cdc..80e61378 100644 --- a/macos/main/with-tobii.swift +++ b/macos/main/with-tobii.swift @@ -54,21 +54,25 @@ struct CalibrationValidationTesterSwiftView: View { if showing.value { HStack { List { - Section(header: Text("accuracy (degrees)")) { - TextField("left", text: $leftEyeAccuracyDegrees.string).disabled(true) - TextField("right", text: $rightEyeAccuracyDegrees.string).disabled(true) + Form { + Section(header: Text("accuracy (degrees)")) { + TextField("left", text: $leftEyeAccuracyDegrees.string).disabled(true) + TextField("right", text: $rightEyeAccuracyDegrees.string).disabled(true) + } } } List { - Section(header: Text("precision (degrees)")) { - TextField("left", text: $leftEyePrecisionDegrees.string).disabled(true) - TextField("right", text: $rightEyePrecisionDegrees.string).disabled(true) + Form { + Section(header: Text("precision (degrees)")) { + TextField("left", text: $leftEyePrecisionDegrees.string).disabled(true) + TextField("right", text: $rightEyePrecisionDegrees.string).disabled(true) + } } } Button("Close") { observableObserver.observer?.notifyThatCloseButtonHasBeenClicked() } - }.padding() + }.frame(height: 200) } } } @@ -148,15 +152,14 @@ class AppDelegate: NSObject, NSApplicationDelegate { } let alert = NSAlert() alert.messageText = "" - alert.informativeText = "This software will store your eye tracking data.\n\nWe do so only for the purpose of the current study (17-13-XP). We never sell, distribute, or make profit on the collected data. Only staff and research personnel on the existing IRB will have access to the data. Any data used for publication or collaborative and/or learning purposes will be deidentified.\n\nThere is no direct benefit to you for doing this study. What we learn from this study may help doctors treat children who have a hard time hearing when it is noisy." - alert.addButton(withTitle: "No, I do not accept") + alert.informativeText = "This software will store your eye tracking data.\n\nWe do so only for the purpose of the current study (11-24-XP). We never sell, distribute, or make profit on the collected data. Only staff and research personnel on the existing IRB will have access to the data. Any data used for publication or collaborative and/or learning purposes will be deidentified.\n\nThere is no direct benefit to you for doing this study. What we learn from this study may help doctors treat children who have a hard time hearing when it is noisy." alert.addButton(withTitle: "Yes, I accept") - alertWindow.makeKeyAndOrderFront(nil) + alert.addButton(withTitle: "No, I do not accept") alert.beginSheetModal(for: alertWindow, completionHandler: { (response: NSApplication.ModalResponse) in alertWindow.orderOut(nil) NSApp.stopModal(withCode: response) }) - if NSApp.runModal(for: alertWindow) == NSApplication.ModalResponse.alertFirstButtonReturn { + if NSApp.runModal(for: alertWindow) == NSApplication.ModalResponse.alertSecondButtonReturn { let terminatingAlert = NSAlert() terminatingAlert.messageText = "" terminatingAlert.informativeText = "User does not accept eye tracking terms. Terminating."