mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-10-07 09:33:28 +00:00
Just clicking on the NSComboBox menu item doesn't select the item clicked
This commit is contained in:
parent
956d2124b9
commit
c2f475aae8
@ -273,6 +273,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
|
||||
_buttonPressed=YES;
|
||||
[controlView setNeedsDisplay:YES];
|
||||
[window makeKeyAndOrderFront:self];
|
||||
selectedIndex=[window runTrackingWithEvent:event];
|
||||
[window close]; // release when closed=YES
|
||||
_buttonPressed=NO;
|
||||
@ -294,10 +295,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
}
|
||||
|
||||
-(NSRect)titleRectForBounds:(NSRect)rect {
|
||||
// Keep some room for the button
|
||||
NSRect buttonFrame = [self buttonRectForBounds:rect];
|
||||
rect.size.width = NSMinX(buttonFrame) - rect.origin.x;
|
||||
rect=[super titleRectForBounds:rect];
|
||||
|
||||
rect.size.width-=rect.size.height;
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,7 @@ enum {
|
||||
}
|
||||
[[self window] flushWindow];
|
||||
|
||||
event=[[self window] nextEventMatchingMask:NSLeftMouseUpMask|NSLeftMouseDraggedMask|NSKeyDownMask];
|
||||
event=[[self window] nextEventMatchingMask:NSLeftMouseDownMask|NSLeftMouseUpMask|NSLeftMouseDraggedMask|NSKeyDownMask];
|
||||
if ([event type] == NSKeyDown) {
|
||||
[self interpretKeyEvents:[NSArray arrayWithObject:event]];
|
||||
switch (_keyboardUIState) {
|
||||
|
Loading…
Reference in New Issue
Block a user