mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
NSBestDepth() checks outarg non-null (Functions.m); getNSFont() treats negative fontSize arg as 0 (NSFont.m); documented
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20231 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
625f41d0fd
commit
51256bbe12
3 changed files with 22 additions and 9 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-10-17 Adrian Robert <arobert@cogsci.ucsd.edu>
|
||||
* Source/Functions.m (NSBestDepth): Check outarg exactMatch is
|
||||
non-null before setting.
|
||||
* Source/NSFont.m (getNSFont): Use defaultSize for 'fontSize'
|
||||
args of <0 as well as ==0; documented.
|
||||
|
||||
2004-10-11 Georg Fleischmann
|
||||
|
||||
* Model/GMAppKit.m [-encodeWithModelArchiver:] remove title
|
||||
|
|
|
@ -139,8 +139,9 @@ NSBestDepth(NSString *colorSpace, int bitsPerSample, int bitsPerPixel,
|
|||
const NSWindowDepth *depths = NSAvailableWindowDepths();
|
||||
NSWindowDepth bestDepth = NSDefaultDepth;
|
||||
|
||||
*exactMatch = NO;
|
||||
|
||||
if (exactMatch != NULL)
|
||||
*exactMatch = NO;
|
||||
|
||||
if (components == 1)
|
||||
{
|
||||
for (index = 0; depths[index] != 0; index++)
|
||||
|
@ -152,7 +153,8 @@ NSBestDepth(NSString *colorSpace, int bitsPerSample, int bitsPerPixel,
|
|||
bestDepth = depth;
|
||||
if (NSBitsPerSampleFromDepth(depth) == bitsPerSample)
|
||||
{
|
||||
*exactMatch = YES;
|
||||
if (exactMatch != NULL)
|
||||
*exactMatch = YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -168,7 +170,8 @@ NSBestDepth(NSString *colorSpace, int bitsPerSample, int bitsPerPixel,
|
|||
bestDepth = depth;
|
||||
if (NSBitsPerSampleFromDepth(depth) == bitsPerSample)
|
||||
{
|
||||
*exactMatch = YES;
|
||||
if (exactMatch != NULL)
|
||||
*exactMatch = YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -329,7 +329,7 @@ static NSFont *getNSFont(float fontSize, int role)
|
|||
|
||||
font_role = role * 2;
|
||||
|
||||
defaultSize = (fontSize == 0.0);
|
||||
defaultSize = (fontSize <= 0.0);
|
||||
if (defaultSize)
|
||||
{
|
||||
if (font_roles[role].cachedFont)
|
||||
|
@ -451,7 +451,8 @@ static void setNSFont(NSString *key, NSFont *font)
|
|||
|
||||
/**
|
||||
* Return the default bold font for use in menus and heading in standard
|
||||
* gui components.<br />
|
||||
* gui components. If fontSize is <= 0, the default
|
||||
* size is used.<br />
|
||||
* This is deprecated in MacOSX
|
||||
*/
|
||||
+ (NSFont*) boldSystemFontOfSize: (float)fontSize
|
||||
|
@ -461,7 +462,8 @@ static void setNSFont(NSString *key, NSFont *font)
|
|||
|
||||
/**
|
||||
* Return the default font for use in menus and heading in standard
|
||||
* gui components.<br />
|
||||
* gui components. If fontSize is <= 0, the default
|
||||
* size is used.<br />
|
||||
* This is deprecated in MacOSX
|
||||
*/
|
||||
+ (NSFont*) systemFontOfSize: (float)fontSize
|
||||
|
@ -471,7 +473,8 @@ static void setNSFont(NSString *key, NSFont *font)
|
|||
|
||||
/**
|
||||
* Return the default fixed pitch font for use in locations other
|
||||
* than standard gui components.
|
||||
* than standard gui components. If fontSize is <= 0, the default
|
||||
* size is used.
|
||||
*/
|
||||
+ (NSFont*) userFixedPitchFontOfSize: (float)fontSize
|
||||
{
|
||||
|
@ -480,7 +483,8 @@ static void setNSFont(NSString *key, NSFont *font)
|
|||
|
||||
/**
|
||||
* Return the default font for use in locations other
|
||||
* than standard gui components.
|
||||
* than standard gui components. If fontSize is <= 0, the default
|
||||
* size is used.
|
||||
*/
|
||||
+ (NSFont*) userFontOfSize: (float)fontSize
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue