From 9e0187ca55a15b1b76b9f6692296b89c0420c7bd Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 26 May 2019 21:38:13 -0700 Subject: [PATCH] Fix tableView frame in Preferences > Accounts sidebar. For some reason IB wants it wider than the clip view. This leads to unwanted horizontal scrolling. --- Mac/Base.lproj/Preferences.storyboard | 12 ++++++------ .../Accounts/AccountsPreferencesViewController.swift | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Mac/Base.lproj/Preferences.storyboard b/Mac/Base.lproj/Preferences.storyboard index 69ab33c6f..9f9ae0ab7 100644 --- a/Mac/Base.lproj/Preferences.storyboard +++ b/Mac/Base.lproj/Preferences.storyboard @@ -257,20 +257,20 @@ - + - - + + - + @@ -284,7 +284,7 @@ - + @@ -293,7 +293,7 @@ - + diff --git a/Mac/Preferences/Accounts/AccountsPreferencesViewController.swift b/Mac/Preferences/Accounts/AccountsPreferencesViewController.swift index 8cf4cde31..4de8f17af 100644 --- a/Mac/Preferences/Accounts/AccountsPreferencesViewController.swift +++ b/Mac/Preferences/Accounts/AccountsPreferencesViewController.swift @@ -29,6 +29,10 @@ final class AccountsPreferencesViewController: NSViewController { showController(AccountsAddViewController()) + // Fix tableView frame — for some reason IB wants it 1pt wider than the clip view. This leads to unwanted horizontal scrolling. + var rTable = tableView.frame + rTable.size.width = tableView.superview!.frame.size.width + tableView.frame = rTable } @IBAction func addAccount(_ sender: Any) {