mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 07:50:53 +00:00
Better NIB loading for NSWindow.
Ignore missing image in NSButtonCell drawing. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26591 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
873c7f19d0
commit
3d9091f2d4
3 changed files with 24 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2008-06-02 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* 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 <FredKiefer@gmx.de>
|
2008-05-28 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSMenuItem.m (-setKeyEquivalent:): Warn about
|
* Source/NSMenuItem.m (-setKeyEquivalent:): Warn about
|
||||||
|
|
|
@ -185,9 +185,13 @@ static BOOL _isInInterfaceBuilder = NO;
|
||||||
{
|
{
|
||||||
_maxSize = [coder decodeSizeForKey: @"NSMaxSize"];
|
_maxSize = [coder decodeSizeForKey: @"NSMaxSize"];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_maxSize = NSMakeSize (10e4, 10e4);
|
||||||
|
}
|
||||||
if ([coder containsValueForKey: @"NSWindowRect"])
|
if ([coder containsValueForKey: @"NSWindowRect"])
|
||||||
{
|
{
|
||||||
_windowRect = [coder decodeRectForKey: @"NSWindowRect"];
|
_windowRect = [coder decodeRectForKey: @"NSWindowRect"];
|
||||||
}
|
}
|
||||||
if ([coder containsValueForKey: @"NSFrameAutosaveName"])
|
if ([coder containsValueForKey: @"NSFrameAutosaveName"])
|
||||||
{
|
{
|
||||||
|
|
|
@ -1102,11 +1102,23 @@ typedef struct _GSButtonCellFlags
|
||||||
{
|
{
|
||||||
imageSize = [imageToDisplay size];
|
imageSize = [imageToDisplay size];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// When there is no image to display, ignore it in the calculations
|
||||||
|
imageToDisplay = nil;
|
||||||
|
ipos = NSNoImage;
|
||||||
|
}
|
||||||
|
|
||||||
if (titleToDisplay && ipos != NSImageOnly)
|
if (titleToDisplay && ipos != NSImageOnly)
|
||||||
{
|
{
|
||||||
titleSize = [titleToDisplay size];
|
titleSize = [titleToDisplay size];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// When there is no text to display, ignore it in the calculations
|
||||||
|
titleToDisplay = nil;
|
||||||
|
ipos = NSImageOnly;
|
||||||
|
}
|
||||||
|
|
||||||
if (flippedView == YES)
|
if (flippedView == YES)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue