mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 20:41:00 +00:00
Add a special case for popup buttons, akin imageRectForBounds
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35868 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3994c4b0bf
commit
02259cada8
2 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2012-12-10 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Source/NSMenuItemCell.m (titleRectForBounds)
|
||||
Add a special case for popup buttons, akin imageRectForBounds
|
||||
|
||||
2012-12-08 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSViewController.m: Add missing #import for NSArray.
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Reference in a new issue