Drawing change on NSBox.

Changed handling of buttons in save and open panel, this was possible after using different values for the run loop constants.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18708 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
FredKiefer 2004-02-29 00:11:51 +00:00
parent 4f6c61328f
commit a22cfc89d0
5 changed files with 37 additions and 24 deletions

View file

@ -65,12 +65,10 @@
{
[super initWithFrame: frameRect];
_cell = [[NSTextFieldCell alloc] initTextCell: @"Title"];
_cell = [[NSCell alloc] initTextCell: @"Title"];
[_cell setAlignment: NSCenterTextAlignment];
[_cell setBordered: NO];
[_cell setEditable: NO];
[_cell setDrawsBackground: YES];
//[_cell setBackgroundColor: [NSColor controlColor]];
_offsets.width = 5;
_offsets.height = 5;
_border_rect = _bounds;
@ -381,7 +379,14 @@
// Draw title
if (_title_position != NSNoTitle)
{
[_cell setBackgroundColor: color];
// If the title is on the border, clip a hole in the later
if ((_border_type != NSNoBorder) &&
((_title_position == NSAtTop) ||
(_title_position == NSAtBottom)))
{
[color set];
NSRectFill(_title_rect);
}
[_cell drawWithFrame: _title_rect inView: self];
}
}