mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-26 12:11:20 +00:00
Kludge for NSPopUpButtons (at least the apps will start).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5237 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
85e1fdf4cf
commit
d30a25a9c4
1 changed files with 10 additions and 7 deletions
|
@ -383,7 +383,7 @@
|
||||||
|
|
||||||
- (void)sizeToFit
|
- (void)sizeToFit
|
||||||
{
|
{
|
||||||
[[popb_menu menuView] sizeToFit];
|
[[popb_menu menuRepresentation] sizeToFit];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)_popup:(NSNotification*)notification
|
- (void)_popup:(NSNotification*)notification
|
||||||
|
@ -396,9 +396,10 @@
|
||||||
butf = [[popb superview] convertRect: butf toView: nil];
|
butf = [[popb superview] convertRect: butf toView: nil];
|
||||||
butf.origin = [[popb window] convertBaseToScreen: butf.origin];
|
butf.origin = [[popb window] convertBaseToScreen: butf.origin];
|
||||||
|
|
||||||
[[popb_menu menuView] sizeToFit];
|
[[popb_menu menuRepresentation] sizeToFit];
|
||||||
|
|
||||||
winf = [NSMenuWindow frameRectForContentRect: [[popb_menu menuView] frame]
|
winf = [NSMenuWindow
|
||||||
|
frameRectForContentRect: [[popb_menu menuRepresentation] frame]
|
||||||
styleMask: [[popb_menu window] styleMask]];
|
styleMask: [[popb_menu window] styleMask]];
|
||||||
/*
|
/*
|
||||||
* Set popup window frame origin so that the top-left corner of the
|
* Set popup window frame origin so that the top-left corner of the
|
||||||
|
@ -436,7 +437,7 @@
|
||||||
object: self
|
object: self
|
||||||
userInfo: nil];
|
userInfo: nil];
|
||||||
|
|
||||||
[[popb_menu menuView] mouseDown:
|
[[popb_menu menuRepresentation] mouseDown:
|
||||||
[NSEvent mouseEventWithType: NSLeftMouseDown
|
[NSEvent mouseEventWithType: NSLeftMouseDown
|
||||||
location: [[popb_menu window] mouseLocationOutsideOfEventStream]
|
location: [[popb_menu window] mouseLocationOutsideOfEventStream]
|
||||||
modifierFlags: [theEvent modifierFlags]
|
modifierFlags: [theEvent modifierFlags]
|
||||||
|
@ -497,9 +498,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!popb_pullsDown)
|
if (!popb_pullsDown)
|
||||||
aCell = [[popb_menu itemArray] objectAtIndex:popb_selectedItem];
|
aCell = [[popb_menu menuRepresentation]
|
||||||
|
menuItemCellForItemAtIndex: popb_selectedItem];
|
||||||
else
|
else
|
||||||
aCell = [[popb_menu itemArray] objectAtIndex:0];
|
aCell = [[popb_menu menuRepresentation]
|
||||||
|
menuItemCellForItemAtIndex: 0];
|
||||||
|
|
||||||
[aCell drawWithFrame:bounds inView:self];
|
[aCell drawWithFrame:bounds inView:self];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue