From dec7a6bd33d5ee7bee5b9757b1da378d61a7cc5b Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Wed, 13 Sep 2017 17:40:04 -0400 Subject: [PATCH] Fix editor scrolling horizontally --- writeas/Base.lproj/Main.storyboard | 1 + writeas/ViewController.swift | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/writeas/Base.lproj/Main.storyboard b/writeas/Base.lproj/Main.storyboard index bef6379..c211894 100644 --- a/writeas/Base.lproj/Main.storyboard +++ b/writeas/Base.lproj/Main.storyboard @@ -501,6 +501,7 @@ DQ + diff --git a/writeas/ViewController.swift b/writeas/ViewController.swift index 79c5447..eb986e7 100644 --- a/writeas/ViewController.swift +++ b/writeas/ViewController.swift @@ -11,6 +11,7 @@ import Cocoa class ViewController: NSViewController, NSTextViewDelegate, NSUserNotificationCenterDelegate { @IBOutlet var writerText: NSTextView! + @IBOutlet weak var writerScrollContainer: NSScrollView! var isNight = false @@ -51,7 +52,7 @@ class ViewController: NSViewController, NSTextViewDelegate, NSUserNotificationCe func configureWindow() { // Fit textview to window size - writerText.setFrameSize(NSSize(width: self.view.window!.frame.width, height: self.view.window!.frame.height)) + writerText.setFrameSize(NSSize(width: self.writerScrollContainer.frame.width - 20, height: self.writerScrollContainer.frame.height)) } override var representedObject: Any? {