mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 22:10:36 +00:00
* Source/NSMenuItemCell.m (-titleRectForBounds:): Attempted fix
for bug 35702. Don't use [_menuView imageAndTitleWidth] or _titleWidth in calculating the size to put the title in. In other words, -titleRectForBounds: will now return the available space for the title, rather than the rect that the title text is predicted to use up. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34885 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
315052486f
commit
1f151a6e95
2 changed files with 13 additions and 6 deletions
|
@ -565,8 +565,7 @@ static NSString *commandKeyString = @"#";
|
|||
{
|
||||
// Calculate the image part of cell frame from NSMenuView
|
||||
cellFrame.origin.x += [_menuView imageAndTitleOffset];
|
||||
cellFrame.size.width = MIN(cellFrame.size.width - [_menuView imageAndTitleOffset],
|
||||
[_menuView imageAndTitleWidth]);
|
||||
cellFrame.size.width = cellFrame.size.width - [_menuView imageAndTitleOffset];
|
||||
|
||||
switch (_cell.image_position)
|
||||
{
|
||||
|
@ -580,13 +579,11 @@ static NSString *commandKeyString = @"#";
|
|||
|
||||
case NSImageLeft:
|
||||
cellFrame.origin.x += _imageWidth + GSCellTextImageXDist;
|
||||
cellFrame.size.width = MIN(cellFrame.size.width - (_imageWidth + GSCellTextImageXDist),
|
||||
_titleWidth);
|
||||
cellFrame.size.width = cellFrame.size.width - (_imageWidth + GSCellTextImageXDist);
|
||||
break;
|
||||
|
||||
case NSImageRight:
|
||||
cellFrame.size.width = MIN(cellFrame.size.width - (_imageWidth + GSCellTextImageXDist),
|
||||
_titleWidth);
|
||||
cellFrame.size.width = cellFrame.size.width - (_imageWidth + GSCellTextImageXDist);
|
||||
break;
|
||||
|
||||
case NSImageBelow:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue