diff --git a/ChangeLog b/ChangeLog index f10e450ec..a2e731a5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-12-10 Riccardo Mottola + + * Source/NSMenuItemCell.m (titleRectForBounds) + Add a special case for popup buttons, akin imageRectForBounds + 2012-12-08 Fred Kiefer * Source/NSViewController.m: Add missing #import for NSArray. diff --git a/Source/NSMenuItemCell.m b/Source/NSMenuItemCell.m index 26c340451..1a13b936a 100644 --- a/Source/NSMenuItemCell.m +++ b/Source/NSMenuItemCell.m @@ -526,6 +526,14 @@ static NSString *commandKeyString = @"#"; if (_needs_sizing) [self calcSize]; + 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; + return cellFrame; + } + if ([_menuView isHorizontal] == YES) { /* This adjust will center us within the menubar. */