mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 18:11:06 +00:00
Fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4557 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2df56c0541
commit
2661be8f55
2 changed files with 19 additions and 2 deletions
|
@ -4,6 +4,8 @@
|
|||
in the tabs works wonderfully. Now just need to hook up code to
|
||||
draw the selected tabs view in the tabview rect.
|
||||
|
||||
[Check out nstabview.app in Testing/, you won't regret it, hehe.]
|
||||
|
||||
1999-07-9 Michael Hanni <mhanni@sprintmail.com>
|
||||
|
||||
* Headers/AppKit/NSTabViewItem.h: defined some non-spec methods.
|
||||
|
|
|
@ -163,7 +163,16 @@
|
|||
|
||||
- (NSRect)contentRect
|
||||
{
|
||||
return NSZeroRect;
|
||||
NSRect cRect = [self frame];
|
||||
|
||||
cRect.origin.x = 2;
|
||||
cRect.origin.y = 2;
|
||||
cRect.size.height -= 4;
|
||||
cRect.size.width -= 4;
|
||||
|
||||
cRect.size.height -= 21;
|
||||
|
||||
return cRect;
|
||||
}
|
||||
|
||||
// Drawing.
|
||||
|
@ -330,11 +339,17 @@ tRect.origin.x, tRect.origin.y, tRect.size.width, tRect.size.height);
|
|||
NSTabViewItem *anItem = [self tabViewItemAtPoint:aPoint];
|
||||
|
||||
if (anItem) {
|
||||
if (tab_selected)
|
||||
if (tab_selected) {
|
||||
[tab_selected _setTabState:NSBackgroundTab];
|
||||
if ([tab_selected view])
|
||||
[[tab_selected view] removeFromSuperview];
|
||||
}
|
||||
|
||||
tab_selected = anItem;
|
||||
[anItem _setTabState:NSSelectedTab];
|
||||
if ([anItem view]) {
|
||||
[self addSubview:[anItem view]];
|
||||
}
|
||||
}
|
||||
|
||||
[self setNeedsDisplay:YES];
|
||||
|
|
Loading…
Reference in a new issue