* Source/GSThemeDrawing.m: Draw a question mark centered in the bezel

for NSHelpButtonBezelStyle


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34072 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2011-10-26 02:25:36 +00:00
parent 25c6770196
commit 991c4639a7
2 changed files with 22 additions and 1 deletions

View file

@ -153,9 +153,25 @@
break;
case NSCircularBezelStyle:
frame = NSInsetRect(frame, 3, 3);
case NSHelpButtonBezelStyle:
[self drawCircularBezel: frame withColor: color];
break;
case NSHelpButtonBezelStyle:
[self drawCircularBezel: frame withColor: color];
{
NSDictionary *attributes = [NSDictionary dictionaryWithObject: [NSFont controlContentFontOfSize: 0]
forKey: NSFontAttributeName];
NSAttributedString *questionMark = [[[NSAttributedString alloc]
initWithString: _(@"?")
attributes: attributes] autorelease];
NSRect textRect;
textRect.size = [questionMark size];
textRect.origin.x = NSMidX(frame) - (textRect.size.width / 2);
textRect.origin.y = NSMidY(frame) - (textRect.size.height / 2);
[questionMark drawInRect: textRect];
}
break;
case NSDisclosureBezelStyle:
case NSRoundedDisclosureBezelStyle:
case NSRecessedBezelStyle: