diff --git a/A2Mac/Base.lproj/Main.storyboard b/A2Mac/Base.lproj/Main.storyboard
index 74887bc..9c6e669 100644
--- a/A2Mac/Base.lproj/Main.storyboard
+++ b/A2Mac/Base.lproj/Main.storyboard
@@ -1811,7 +1811,7 @@ Gw
-
+
@@ -2368,6 +2368,7 @@ Gw
+
diff --git a/A2Mac/MonitorView.swift b/A2Mac/MonitorView.swift
index 9b90af7..c2ea82d 100644
--- a/A2Mac/MonitorView.swift
+++ b/A2Mac/MonitorView.swift
@@ -25,6 +25,7 @@ import Cocoa
class MonitorView: NSView {
+ @IBOutlet weak var textDisplayScroller: DisplayScrollView!
@IBOutlet var textDisplay: DisplayView!
@IBOutlet weak var scanlinesView: NSImageView!
@@ -43,6 +44,8 @@ class MonitorView: NSView {
}
func adjustTextDisplaySize() {
+ textDisplayScroller.updateConstraints()
+
var textFrameSize = frame.size
if textDisplay_width_diff == nil {
@@ -92,7 +95,10 @@ class MonitorView: NSView {
// BUGFIX: I am not sure why but if I do not adjust the frame and bounds size
// couple of times, Cocoa miscalculates them
if let textDisplay = textDisplay {
- for _ in 0...15 {
+ textDisplay.setFrameSize(textFrameSize)
+ textDisplay.setBoundsSize(MonitorView.textViewBounds)
+ DispatchQueue.main.async() {
+// for _ in 0...15 {
textDisplay.setFrameSize(textFrameSize)
// textDisplay.setBoundsSize(MonitorView.textViewBounds)
// textDisplay.setFrameSize(scanlinesView.frame.size)
diff --git a/A2Mac/ViewController.swift b/A2Mac/ViewController.swift
index a9f3f93..f406b87 100644
--- a/A2Mac/ViewController.swift
+++ b/A2Mac/ViewController.swift
@@ -1734,7 +1734,9 @@ class ViewController: NSViewController {
textDisplay.setSelectedRange(NSRange())
textDisplay.window?.makeFirstResponder(self)
- monitorView.adjustTextDisplaySize()
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
+ self.monitorView.adjustTextDisplaySize()
+ }
}