diff options
-rw-r--r-- | cocoa/InfoBar.mm | 4 | ||||
-rw-r--r-- | cocoa/PlatCocoa.mm | 4 | ||||
-rw-r--r-- | cocoa/ScintillaCocoa.mm | 20 | ||||
-rw-r--r-- | cocoa/ScintillaView.mm | 6 |
4 files changed, 17 insertions, 17 deletions
diff --git a/cocoa/InfoBar.mm b/cocoa/InfoBar.mm index 9ac3c3a98..07949c3ee 100644 --- a/cocoa/InfoBar.mm +++ b/cocoa/InfoBar.mm @@ -192,7 +192,7 @@ static float BarFontSize = 10.0; NSTextFieldCell *cell = mCaretPositionLabel.cell; cell.placeholderString = @"0:0"; - cell.alignment = NSCenterTextAlignment; + cell.alignment = NSTextAlignmentCenter; [self addSubview: mCaretPositionLabel]; @@ -228,7 +228,7 @@ static float BarFontSize = 10.0; if (mBackground.size.width != 0) { NSPoint target = {rect.origin.x, 0}; while (target.x < rect.origin.x + rect.size.width) { - [mBackground drawAtPoint: target fromRect: NSZeroRect operation: NSCompositeCopy fraction: 1]; + [mBackground drawAtPoint: target fromRect: NSZeroRect operation: NSCompositingOperationCopy fraction: 1]; target.x += mBackground.size.width; } } diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 66d9aad4e..4789f7528 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -1702,7 +1702,7 @@ void ListBoxImpl::Create(Window & /*parent*/, int /*ctrlID*/, Scintilla::Point p NSRect lbRect = NSMakeRect(pt.x, pt.y, 120, lineHeight * desiredVisibleRows); NSWindow *winLB = [[NSWindow alloc] initWithContentRect: lbRect - styleMask: NSBorderlessWindowMask + styleMask: NSWindowStyleMaskBorderless backing: NSBackingStoreBuffered defer: NO]; [winLB setLevel: NSFloatingWindowLevel]; @@ -1780,7 +1780,7 @@ PRectangle ListBoxImpl::GetDesiredRect() { if (Length() > rows) { [scroller setHasVerticalScroller: YES]; - rcDesired.right += [NSScroller scrollerWidthForControlSize: NSRegularControlSize + rcDesired.right += [NSScroller scrollerWidthForControlSize: NSControlSizeRegular scrollerStyle: NSScrollerStyleLegacy]; } else { [scroller setHasVerticalScroller: NO]; diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index 0354c2df8..d88e0e3ed 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -1131,7 +1131,7 @@ void ScintillaCocoa::CreateCallTipWindow(PRectangle rc) { if (!ct.wCallTip.Created()) { NSRect ctRect = NSMakeRect(rc.top, rc.bottom, rc.Width(), rc.Height()); NSWindow *callTip = [[NSWindow alloc] initWithContentRect: ctRect - styleMask: NSBorderlessWindowMask + styleMask: NSWindowStyleMaskBorderless backing: NSBackingStoreBuffered defer: NO]; [callTip setLevel: NSFloatingWindowLevel]; @@ -1418,7 +1418,7 @@ void ScintillaCocoa::StartDrag() { NSImage *dragImage = [[NSImage alloc] initWithSize: selectionRectangle.size]; dragImage.backgroundColor = [NSColor clearColor]; [dragImage lockFocus]; - [image drawAtPoint: NSZeroPoint fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 0.5]; + [image drawAtPoint: NSZeroPoint fromRect: NSZeroRect operation: NSCompositingOperationSourceOver fraction: 0.5]; [dragImage unlockFocus]; NSPoint startPoint; @@ -2094,17 +2094,17 @@ static inline UniChar KeyTranslate(UniChar unicodeChar, NSEventModifierFlags mod case 27: return SCK_ESCAPE; case '+': - if (modifierFlags & NSNumericPadKeyMask) + if (modifierFlags & NSEventModifierFlagNumericPad) return SCK_ADD; else return unicodeChar; case '-': - if (modifierFlags & NSNumericPadKeyMask) + if (modifierFlags & NSEventModifierFlagNumericPad) return SCK_SUBTRACT; else return unicodeChar; case '/': - if (modifierFlags & NSNumericPadKeyMask) + if (modifierFlags & NSEventModifierFlagNumericPad) return SCK_DIVIDE; else return unicodeChar; @@ -2129,10 +2129,10 @@ static inline UniChar KeyTranslate(UniChar unicodeChar, NSEventModifierFlags mod static int TranslateModifierFlags(NSUInteger modifiers) { // Signal Control as SCI_META return - (((modifiers & NSShiftKeyMask) != 0) ? SCI_SHIFT : 0) | - (((modifiers & NSCommandKeyMask) != 0) ? SCI_CTRL : 0) | - (((modifiers & NSAlternateKeyMask) != 0) ? SCI_ALT : 0) | - (((modifiers & NSControlKeyMask) != 0) ? SCI_META : 0); + (((modifiers & NSEventModifierFlagShift) != 0) ? SCI_SHIFT : 0) | + (((modifiers & NSEventModifierFlagCommand) != 0) ? SCI_CTRL : 0) | + (((modifiers & NSEventModifierFlagOption) != 0) ? SCI_ALT : 0) | + (((modifiers & NSEventModifierFlagControl) != 0) ? SCI_META : 0); } //-------------------------------------------------------------------------------------------------- @@ -2362,7 +2362,7 @@ void ScintillaCocoa::MouseUp(NSEvent *event) { //-------------------------------------------------------------------------------------------------- void ScintillaCocoa::MouseWheel(NSEvent *event) { - bool command = (event.modifierFlags & NSCommandKeyMask) != 0; + bool command = (event.modifierFlags & NSEventModifierFlagCommand) != 0; int dY = 0; // In order to make scrolling with larger offset smoother we scroll less lines the larger the diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index 00f30e2f4..75f3c4f41 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -706,7 +706,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { */ - (void) scrollWheel: (NSEvent *) theEvent { #ifdef SCROLL_WHEEL_MAGNIFICATION - if (([theEvent modifierFlags] & NSCommandKeyMask) != 0) { + if (([theEvent modifierFlags] & NSEventModifierFlagCommand) != 0) { mOwner.backend->MouseWheel(theEvent); return; } @@ -1129,7 +1129,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { rect.size.height = 1.0; NSRect rectInWindow = [self.superview.superview convertRect: rect toView: nil]; NSPoint pt = rectInWindow.origin; - NSEvent *event = [NSEvent mouseEventWithType: NSRightMouseDown + NSEvent *event = [NSEvent mouseEventWithType: NSEventTypeRightMouseDown location: pt modifierFlags: 0 timestamp: 0 @@ -1480,7 +1480,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { * Used to position and size the parts of the editor (content, scrollers, info bar). */ - (void) positionSubViews { - CGFloat scrollerWidth = [NSScroller scrollerWidthForControlSize: NSRegularControlSize + CGFloat scrollerWidth = [NSScroller scrollerWidthForControlSize: NSControlSizeRegular scrollerStyle: NSScrollerStyleLegacy]; NSSize size = self.frame.size; |