|
86 | 86 | */
|
87 | 87 | static BOOL FindLinesInFile(NSData *fileData,const void *first,size_t first_len,const void *second,size_t second_len);
|
88 | 88 |
|
| 89 | +static BOOL isOSAtLeast10_7; |
| 90 | + |
89 | 91 | @interface SPConnectionController ()
|
90 | 92 |
|
91 | 93 | // Privately redeclare as read/write to get the synthesized setter
|
@@ -178,6 +180,10 @@ @implementation SPConnectionController
|
178 | 180 | @synthesize isConnecting;
|
179 | 181 | @synthesize isEditingConnection;
|
180 | 182 |
|
| 183 | ++ (void)initialize { |
| 184 | + isOSAtLeast10_7 = [SPOSInfo isOSVersionAtLeastMajor:10 minor:7 patch:0]; |
| 185 | +} |
| 186 | + |
181 | 187 | - (NSString *)keychainPassword
|
182 | 188 | {
|
183 | 189 | NSString *kcItemName = [self connectionKeychainItemName];
|
@@ -2981,10 +2987,15 @@ - (void)scrollViewFrameChanged:(NSNotification *)aNotification
|
2981 | 2987 | // the division may lead to values that are not valid for the current screen size (e.g. non-integer values on a
|
2982 | 2988 | // @1x non-retina screen). The OS works something out when not using layer-backed views, but in the latter
|
2983 | 2989 | // case the result will look like garbage if we don't fix this.
|
2984 |
| - // This code is taken from Apple's "BlurryView" example code. |
2985 |
| - connectionDetailsFrame = [[connectionDetailsScrollView superview] convertRectToBase:connectionDetailsFrame]; |
2986 |
| - connectionDetailsFrame.origin.y = round(connectionDetailsFrame.origin.y); |
2987 |
| - connectionDetailsFrame = [[connectionDetailsScrollView superview] convertRectFromBase:connectionDetailsFrame]; |
| 2990 | + if(isOSAtLeast10_7) { |
| 2991 | + connectionDetailsFrame = [connectionDetailsScrollView backingAlignedRect:connectionDetailsFrame options:NSAlignAllEdgesNearest]; |
| 2992 | + } |
| 2993 | + else { |
| 2994 | + // This code is taken from Apple's "BlurryView" example code. |
| 2995 | + connectionDetailsFrame = [[connectionDetailsScrollView superview] convertRectToBase:connectionDetailsFrame]; |
| 2996 | + connectionDetailsFrame.origin.y = round(connectionDetailsFrame.origin.y); |
| 2997 | + connectionDetailsFrame = [[connectionDetailsScrollView superview] convertRectFromBase:connectionDetailsFrame]; |
| 2998 | + } |
2988 | 2999 | [connectionResizeContainer setFrame:connectionDetailsFrame];
|
2989 | 3000 | scrollDocumentFrame.size.height = scrollViewFrame.size.height;
|
2990 | 3001 | [[connectionDetailsScrollView documentView] setFrame:scrollDocumentFrame];
|
|
0 commit comments