Skip to content

Commit

Permalink
Make #3387 backwards compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoagx committed Feb 20, 2019
1 parent cc05b73 commit c88e7c5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Source/SPDatabaseDocument.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
static NSString *SPNewDatabaseCopyContent = @"SPNewDatabaseCopyContent";

static int64_t SPDatabaseDocumentInstanceCounter = 0;
static BOOL isOSAtLeast10_14;

@interface SPDatabaseDocument ()

Expand Down Expand Up @@ -147,6 +148,10 @@ @implementation SPDatabaseDocument

#pragma mark -

+ (void)initialize {
isOSAtLeast10_14 = [SPOSInfo isOSVersionAtLeastMajor:10 minor:14 patch:0];
}

- (id)init
{
if ((self = [super init])) {
Expand Down Expand Up @@ -5895,7 +5900,7 @@ - (void)updateChooseDatabaseToolbarItemWidth
CGFloat leftPaneWidth = [[[contentViewSplitter subviews] objectAtIndex:0] frame].size.width;

// subtract some pixels to allow for misc stuff
leftPaneWidth -= 9;
leftPaneWidth -= isOSAtLeast10_14 ? 9 : 12;

// make sure it's not too small or to big
if (leftPaneWidth < 130) leftPaneWidth = 130;
Expand Down

0 comments on commit c88e7c5

Please sign in to comment.