mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Add new backingScaleFactor method on NSScreen.
This commit is contained in:
parent
350ba62d7d
commit
7270f8efc7
4 changed files with 18 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
2017-12-03 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSScreen.h
|
||||
* Source/NSScreen.m (-backingScaleFactor): Add new method. Change
|
||||
return value of -userSpaceScaleFactor to CGFloat.
|
||||
* Source/NSWindow.m (-backingScaleFactor): Return 1 instead of 0.
|
||||
|
||||
2017-10-28 Graham Lee <graham@iamleeg.com>
|
||||
|
||||
* Source/NSImage.m (initWithCoder:): restore image name when
|
||||
|
|
|
@ -74,7 +74,10 @@
|
|||
- (int) screenNumber;
|
||||
#endif
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
- (float) userSpaceScaleFactor;
|
||||
- (CGFloat) userSpaceScaleFactor;
|
||||
#endif
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)
|
||||
- (CGFloat) backingScaleFactor;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
|
|
@ -418,7 +418,7 @@ static NSMutableArray *screenArray = nil;
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (float) userSpaceScaleFactor
|
||||
- (CGFloat) userSpaceScaleFactor
|
||||
{
|
||||
NSNumber *factor = [[NSUserDefaults standardUserDefaults]
|
||||
objectForKey: @"GSScaleFactor"];
|
||||
|
@ -443,6 +443,11 @@ static NSMutableArray *screenArray = nil;
|
|||
}
|
||||
}
|
||||
|
||||
- (CGFloat) backingScaleFactor
|
||||
{
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
@ -5662,7 +5662,7 @@ current key view.<br />
|
|||
|
||||
- (CGFloat) backingScaleFactor
|
||||
{
|
||||
return 0;
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
+ (NSInteger)windowNumberAtPoint:(NSPoint)point
|
||||
|
|
Loading…
Reference in a new issue