more bugfixing for bug 750

This commit is contained in:
Autorelease Pool 2011-10-09 20:18:25 +02:00
parent 0edcba5c71
commit f68b66be57

View File

@ -205,14 +205,16 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
-(NSRect)titleRect {
// Obtain the size the title cell prefers
NSSize size = [_titleCell cellSize];
NSSize size = [_titleCell cellSize];
NSRect bounds=[self bounds];
NSRect result=NSZeroRect;
result.origin.x=10+TEXTGAP;
result.size.height=ceil(size.height);
result.size.width=ceil(size.width);
//result.size.width=ceil(size.width); // // NSTextField cell must be bugged we get too low values for the width here
result.size.width = bounds.size.width - result.origin.x; // use the whole width until the text field cell size is fixed
switch(_titlePosition){
case NSNoTitle:
@ -242,6 +244,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
break;
}
return result;
}
@ -305,7 +308,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
if (_boxType != NSBoxSeparator) {
// Separator are transparent except for drawing a line
[[NSColor controlColor] setFill];
NSRectFill(rect);
NSRectFill(grooveRect);
}
if (_boxType == NSBoxCustom){
@ -410,6 +413,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
-(void)updateCell:(NSCell *)cell
{
[self setNeedsDisplay:YES];
}
@end