mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 23:50:49 +00:00
* Source/NSImage.m (-bestRepresentationForDevice:): When
all other matching criteria fail, use the first image instead of the last (arbitrary, but seems to match cocoa.) git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34166 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
465552f777
commit
d379015d22
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2011-11-11 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSImage.m (-bestRepresentationForDevice:): When
|
||||||
|
all other matching criteria fail, use the first image instead
|
||||||
|
of the last (arbitrary, but seems to match cocoa.)
|
||||||
|
|
||||||
2011-11-11 Eric Wasylishen <ewasylishen@gmail.com>
|
2011-11-11 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
* Source/NSAlert.m: Use NSImageScaleProportionallyUpOrDown on
|
* Source/NSAlert.m: Use NSImageScaleProportionallyUpOrDown on
|
||||||
|
|
|
@ -1487,7 +1487,7 @@ static NSSize GSResolutionOfImageRep(NSImageRep *rep)
|
||||||
NSArray *reps = [self _bestRepresentationsForDevice: deviceDescription];
|
NSArray *reps = [self _bestRepresentationsForDevice: deviceDescription];
|
||||||
|
|
||||||
/* If we have more than one match check for a representation whose size
|
/* If we have more than one match check for a representation whose size
|
||||||
* matches the image size exactly. Otherwise, arbitrarily choose the last
|
* matches the image size exactly. Otherwise, arbitrarily choose the first
|
||||||
* representation. */
|
* representation. */
|
||||||
if ([reps count] > 1)
|
if ([reps count] > 1)
|
||||||
{
|
{
|
||||||
|
@ -1502,7 +1502,7 @@ static NSSize GSResolutionOfImageRep(NSImageRep *rep)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return [reps lastObject];
|
return [reps objectAtIndex: 0];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSImageRep *) bestRepresentationForRect: (NSRect)rect
|
- (NSImageRep *) bestRepresentationForRect: (NSRect)rect
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue