mirror of
https://github.com/transmission/transmission.git
synced 2026-05-01 06:02:38 +01:00
[macos] Replace Deprecated constants. (#2038)
* Replace Deprecated constants pt.1 - `NSOnState` -> `NSControlStateValueOn` - `NSOffState` -> `NSControlStateValueOff` - `MSMixedState` -> `NSControlStateValueMixed` * Replace Deprecated constants pt.2 - `NS(\w+)AlertStyle` -> `NSAlertStyle$1` * Replace Deprecated constants pt.3 - `NSFileHandlingPanel(\w+)Button` -> `NSModalResponse$1` * Replace Deprecated constants pt.4 - `NSMouse(Entered|Exited)Mask` -> `NSEventMaskMouse$1` - `NS(Left|Right)Mouse(Down|Up|Dragged)Mask` -> `NSEventMask$1Mouse$2` - `NSMouse(Entered|Exited)` -> `NSEventTypeMouse$1` - `NS(Left|Right)Mouse(Up|Down)` -> `NSEventType$1Mouse$2` * Replace Deprecated constants pt.5 - `NSComposite(\w+)` -> `NSCompositingOperation$1` * Replace Deprecated constants pt.6 - `NSAlternateKeyMask` -> `NSEventModifierFlagOption` - `NSCommandKeyMask` -> `NSEventModifierFlagCommand` * Replace Deprecated constants pt.7 - `NS(\w+)TextAlignment` -> `NSTextAlignment$1` - `NSBackgroundStyleDark` -> `NSBackgroundStyleEmphasized` * Replace Deprecated constants pt.8 - `NSTexturedRoundedBezelStyle` -> `NSBezelStyleTexturedRounded` - `NSBorderlessWindowMask` -> `NSWindowStyleMaskBorderless` - `NS(OK|Cancel)Button` -> `NSModalResponse$1`
This commit is contained in:
committed by
GitHub
parent
8cac7d6f94
commit
b8c01a581e
@@ -20,7 +20,7 @@ NSString* generateIconData(NSString* fileExtension, NSUInteger width, NSMutableD
|
||||
NSRect const iconFrame = NSMakeRect(0.0, 0.0, width, width);
|
||||
NSImage* renderedIcon = [[NSImage alloc] initWithSize:iconFrame.size];
|
||||
[renderedIcon lockFocus];
|
||||
[icon drawInRect:iconFrame fromRect:NSZeroRect operation:NSCompositeCopy fraction:1.0];
|
||||
[icon drawInRect:iconFrame fromRect:NSZeroRect operation:NSCompositingOperationCopy fraction:1.0];
|
||||
[renderedIcon unlockFocus];
|
||||
|
||||
NSData* iconData = [renderedIcon TIFFRepresentation];
|
||||
|
||||
Reference in New Issue
Block a user