aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/ScintillaView.mm
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2014-12-07 09:58:45 +1100
committerNeil Hodgson <nyamatongwe@gmail.com>2014-12-07 09:58:45 +1100
commit52555d3fcea8c87720878f18969c87fca304f981 (patch)
tree52a828ef54212367763b919d846b3361eeeddf7b /cocoa/ScintillaView.mm
parenta18a78023bea1911bd66cf4f1a36883a4432cae6 (diff)
downloadscintilla-mirror-52555d3fcea8c87720878f18969c87fca304f981.tar.gz
Replace calls to deprecated methods with their current equivalents.
Diffstat (limited to 'cocoa/ScintillaView.mm')
-rw-r--r--cocoa/ScintillaView.mm12
1 files changed, 3 insertions, 9 deletions
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm
index 020fddeae..02847acc8 100644
--- a/cocoa/ScintillaView.mm
+++ b/cocoa/ScintillaView.mm
@@ -392,14 +392,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
wParam: 0
lParam: 0];
rect = [[[self superview] superview] convertRect:rect toView:nil];
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_6
- if ([self.window respondsToSelector:@selector(convertRectToScreen:)])
- rect = [self.window convertRectToScreen:rect];
- else // convertRectToScreen not available on 10.6
- rect.origin = [self.window convertBaseToScreen:rect.origin];
-#else
- rect.origin = [self.window convertBaseToScreen:rect.origin];
-#endif
+ rect = [self.window convertRectToScreen:rect];
return rect;
}
@@ -1182,7 +1175,8 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
*/
- (void) positionSubViews
{
- int scrollerWidth = [NSScroller scrollerWidth];
+ int scrollerWidth = [NSScroller scrollerWidthForControlSize:NSRegularControlSize
+ scrollerStyle:NSScrollerStyleLegacy];
NSSize size = [self frame].size;
NSRect barFrame = {0, size.height - scrollerWidth, size.width, static_cast<CGFloat>(scrollerWidth)};