Process text for truncation

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38654 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2015-06-17 17:58:33 +00:00
parent 95e8009b70
commit adbe4f1121
2 changed files with 62 additions and 5 deletions

View file

@ -528,9 +528,13 @@ static NSString *commandKeyString = @"#";
if (_mcell_belongs_to_popupbutton && _cell.image_position)
{
// Special case: draw image on the extreme right
cellFrame.origin.x += [_menuView imageAndTitleOffset];
cellFrame.size.width = _titleWidth;
// TODO: Need to find this out somehow...Testplant-MAL
static const NSUInteger ButtonMargin = 5;
// Special case: image is drawn on the extreme right
// First inset the title rect...Testplant-MAL
cellFrame = NSInsetRect(cellFrame, ButtonMargin, 0);
// Adjust for image on right side i.e. down arrow popup indicator...Testplant-MAL
cellFrame.size.width -= _imageWidth + ButtonMargin;
return cellFrame;
}