mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Use NSString interface to determine size of string to be drawn
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6281 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
35c5942b70
commit
8fc09a3db5
1 changed files with 11 additions and 7 deletions
|
@ -48,9 +48,6 @@
|
|||
#include <AppKit/NSGraphics.h>
|
||||
#include <AppKit/PSOperators.h>
|
||||
|
||||
#include "GSUtil.h"
|
||||
|
||||
|
||||
@implementation NSButtonCell
|
||||
|
||||
/*
|
||||
|
@ -494,8 +491,11 @@
|
|||
|
||||
if (titleToDisplay && (ipos == NSImageAbove || ipos == NSImageBelow))
|
||||
{
|
||||
titleSize
|
||||
= GSUtil_sizeOfMultilineStringWithFont(titleToDisplay, _cell_font);
|
||||
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
_cell_font,
|
||||
NSFontAttributeName,
|
||||
nil];
|
||||
titleSize = [titleToDisplay sizeWithAttributes: dict];
|
||||
}
|
||||
|
||||
if (flippedView == YES)
|
||||
|
@ -697,8 +697,12 @@
|
|||
|
||||
if (titleToDisplay != nil)
|
||||
{
|
||||
titleSize
|
||||
= GSUtil_sizeOfMultilineStringWithFont(titleToDisplay, _cell_font);
|
||||
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
_cell_font,
|
||||
NSFontAttributeName,
|
||||
nil];
|
||||
titleSize = [titleToDisplay sizeWithAttributes: dict];
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue