mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 22:10:47 +00:00
Set size to zero if image does not exist
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11200 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6abceeca91
commit
761ada3e09
2 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2001-10-17 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSMenuItemCell.m (calcSize): Set size to 0 if image does
|
||||||
|
not exist.
|
||||||
|
|
||||||
Wed Oct 17 04:30:25 2001 Nicola Pero <n.pero@mi.flashnet.it>
|
Wed Oct 17 04:30:25 2001 Nicola Pero <n.pero@mi.flashnet.it>
|
||||||
|
|
||||||
* Source/NSTabView.m ([NSTabView -dealloc]): Do not release the
|
* Source/NSTabView.m ([NSTabView -dealloc]): Do not release the
|
||||||
|
|
|
@ -131,6 +131,8 @@ static NSImage *arrowImageH = nil;
|
||||||
// NSOnState
|
// NSOnState
|
||||||
if ([_menuItem onStateImage])
|
if ([_menuItem onStateImage])
|
||||||
componentSize = [[_menuItem onStateImage] size];
|
componentSize = [[_menuItem onStateImage] size];
|
||||||
|
else
|
||||||
|
componentSize = NSMakeSize(0,0);
|
||||||
_stateImageWidth = componentSize.width;
|
_stateImageWidth = componentSize.width;
|
||||||
if (componentSize.height > neededMenuItemHeight)
|
if (componentSize.height > neededMenuItemHeight)
|
||||||
neededMenuItemHeight = componentSize.height;
|
neededMenuItemHeight = componentSize.height;
|
||||||
|
@ -138,6 +140,8 @@ static NSImage *arrowImageH = nil;
|
||||||
// NSOffState
|
// NSOffState
|
||||||
if ([_menuItem offStateImage])
|
if ([_menuItem offStateImage])
|
||||||
componentSize = [[_menuItem offStateImage] size];
|
componentSize = [[_menuItem offStateImage] size];
|
||||||
|
else
|
||||||
|
componentSize = NSMakeSize(0,0);
|
||||||
if (componentSize.width > _stateImageWidth)
|
if (componentSize.width > _stateImageWidth)
|
||||||
_stateImageWidth = componentSize.width;
|
_stateImageWidth = componentSize.width;
|
||||||
if (componentSize.height > neededMenuItemHeight)
|
if (componentSize.height > neededMenuItemHeight)
|
||||||
|
@ -146,6 +150,8 @@ static NSImage *arrowImageH = nil;
|
||||||
// NSMixedState
|
// NSMixedState
|
||||||
if ([_menuItem mixedStateImage])
|
if ([_menuItem mixedStateImage])
|
||||||
componentSize = [[_menuItem mixedStateImage] size];
|
componentSize = [[_menuItem mixedStateImage] size];
|
||||||
|
else
|
||||||
|
componentSize = NSMakeSize(0,0);
|
||||||
if (componentSize.width > _stateImageWidth)
|
if (componentSize.width > _stateImageWidth)
|
||||||
_stateImageWidth = componentSize.width;
|
_stateImageWidth = componentSize.width;
|
||||||
if (componentSize.height > neededMenuItemHeight)
|
if (componentSize.height > neededMenuItemHeight)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue