diff --git a/ChangeLog b/ChangeLog index ff44d6337..9cf0dbf8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-06-02 Fred Kiefer + + * Source/GSNibCompatibility.m (NSWindowTemplate-initWithCoder:): + Use default maxSize for window if none is given in the NIB file. + * Source/NSButtonCell.m (-drawInteriorWithFrame:inView:): Adjust + the image position if either the image or the text doesn't exist. + 2008-05-28 Fred Kiefer * Source/NSMenuItem.m (-setKeyEquivalent:): Warn about diff --git a/Source/GSNibCompatibility.m b/Source/GSNibCompatibility.m index 8d7e3b686..47a9f51b6 100644 --- a/Source/GSNibCompatibility.m +++ b/Source/GSNibCompatibility.m @@ -185,9 +185,13 @@ static BOOL _isInInterfaceBuilder = NO; { _maxSize = [coder decodeSizeForKey: @"NSMaxSize"]; } + else + { + _maxSize = NSMakeSize (10e4, 10e4); + } if ([coder containsValueForKey: @"NSWindowRect"]) { - _windowRect = [coder decodeRectForKey: @"NSWindowRect"]; + _windowRect = [coder decodeRectForKey: @"NSWindowRect"]; } if ([coder containsValueForKey: @"NSFrameAutosaveName"]) { diff --git a/Source/NSButtonCell.m b/Source/NSButtonCell.m index 4efa5b84c..a2fd913ee 100644 --- a/Source/NSButtonCell.m +++ b/Source/NSButtonCell.m @@ -1102,11 +1102,23 @@ typedef struct _GSButtonCellFlags { imageSize = [imageToDisplay size]; } + else + { + // When there is no image to display, ignore it in the calculations + imageToDisplay = nil; + ipos = NSNoImage; + } if (titleToDisplay && ipos != NSImageOnly) { titleSize = [titleToDisplay size]; } + else + { + // When there is no text to display, ignore it in the calculations + titleToDisplay = nil; + ipos = NSImageOnly; + } if (flippedView == YES) {