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
commitd1db597843009f3b7be35396a377ffec280dd5d0 (patch)
tree00b0d5885fc02e700c30d4601ab0817724af4b5f /cocoa/ScintillaView.mm
parent421d7d33448edbc12b28f78cdc448c2fe4da2e20 (diff)
downloadscintilla-mirror-d1db597843009f3b7be35396a377ffec280dd5d0.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)};