mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 04:50:37 +00:00
* 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:
parent
25c6770196
commit
991c4639a7
2 changed files with 22 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue