diff --git a/MacDown/Code/Document/MPDocument.m b/MacDown/Code/Document/MPDocument.m index acbc77ff..af4c9020 100644 --- a/MacDown/Code/Document/MPDocument.m +++ b/MacDown/Code/Document/MPDocument.m @@ -456,6 +456,10 @@ - (void)windowControllerDidLoadNib:(NSWindowController *)controller [self setupEditor:nil]; [self redrawDivider]; [self reloadFromLoadedString]; + + if (self.preferences.previewMode) { + [self setSplitViewDividerLocation:0]; + } }]; } diff --git a/MacDown/Code/Preferences/MPPreferences.h b/MacDown/Code/Preferences/MPPreferences.h index e14d2621..97f47f60 100644 --- a/MacDown/Code/Preferences/MPPreferences.h +++ b/MacDown/Code/Preferences/MPPreferences.h @@ -18,6 +18,7 @@ extern NSString * const MPDidDetectFreshInstallationNotification; @property (assign) NSString *latestVersionInstalled; @property (assign) BOOL updateIncludesPreReleases; @property (assign) BOOL supressesUntitledDocumentOnLaunch; +@property (assign) BOOL previewMode; @property (assign) BOOL createFileForLinkTarget; // Extension flags. diff --git a/MacDown/Code/Preferences/MPPreferences.m b/MacDown/Code/Preferences/MPPreferences.m index 4f54f8e9..60f6bd17 100644 --- a/MacDown/Code/Preferences/MPPreferences.m +++ b/MacDown/Code/Preferences/MPPreferences.m @@ -74,6 +74,7 @@ - (instancetype)init @dynamic latestVersionInstalled; @dynamic updateIncludesPreReleases; @dynamic supressesUntitledDocumentOnLaunch; +@dynamic previewMode; @dynamic createFileForLinkTarget; @dynamic extensionIntraEmphasis; diff --git a/MacDown/Localization/Base.lproj/MPGeneralPreferencesViewController.xib b/MacDown/Localization/Base.lproj/MPGeneralPreferencesViewController.xib index 454499c4..45041cb1 100644 --- a/MacDown/Localization/Base.lproj/MPGeneralPreferencesViewController.xib +++ b/MacDown/Localization/Base.lproj/MPGeneralPreferencesViewController.xib @@ -1,9 +1,9 @@ - - + + - - + + @@ -15,17 +15,17 @@ - + - + - + + + + + + + @@ -166,8 +179,6 @@ - -