Skip to content

Commit c88e7c5

Browse files
committed
Make #3387 backwards compatible
1 parent cc05b73 commit c88e7c5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Source/SPDatabaseDocument.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
static NSString *SPNewDatabaseCopyContent = @"SPNewDatabaseCopyContent";
101101

102102
static int64_t SPDatabaseDocumentInstanceCounter = 0;
103+
static BOOL isOSAtLeast10_14;
103104

104105
@interface SPDatabaseDocument ()
105106

@@ -147,6 +148,10 @@ @implementation SPDatabaseDocument
147148

148149
#pragma mark -
149150

151+
+ (void)initialize {
152+
isOSAtLeast10_14 = [SPOSInfo isOSVersionAtLeastMajor:10 minor:14 patch:0];
153+
}
154+
150155
- (id)init
151156
{
152157
if ((self = [super init])) {
@@ -5895,7 +5900,7 @@ - (void)updateChooseDatabaseToolbarItemWidth
58955900
CGFloat leftPaneWidth = [[[contentViewSplitter subviews] objectAtIndex:0] frame].size.width;
58965901

58975902
// subtract some pixels to allow for misc stuff
5898-
leftPaneWidth -= 9;
5903+
leftPaneWidth -= isOSAtLeast10_14 ? 9 : 12;
58995904

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

0 commit comments

Comments
 (0)