From 991c4639a76b0b75b323151f656676885c72c660 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Wed, 26 Oct 2011 02:25:36 +0000 Subject: [PATCH] * 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 --- ChangeLog | 5 +++++ Source/GSThemeDrawing.m | 18 +++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cf7ba87fb..13089f403 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-10-25 Eric Wasylishen + + * Source/GSThemeDrawing.m: Draw a question mark centered in the bezel + for NSHelpButtonBezelStyle + 2011-10-25 Eric Wasylishen * Source/NSBitmapImageRep.m: diff --git a/Source/GSThemeDrawing.m b/Source/GSThemeDrawing.m index 682105685..6c5234e5c 100644 --- a/Source/GSThemeDrawing.m +++ b/Source/GSThemeDrawing.m @@ -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: