Alexander Ljungberg
8d54c0123b
Fixed: menus not closing on left click.
...
Previously, clicking outside a menu on a control would not close the menu. Also clicking on the menu header again would open a second menu.
This error was caused by the control receiving the click and starting its own tracking, depriving the menu of the mouse up event it was awaiting.
The behaviour to wait for the mouse up was wrong to begin with. Menus should close on mouse down.
This fix closes the menu on left mouse down anywhere but the menu, while still allowing the click to pass through to any control underneath the cursor.
Fixes #1833 .
2013-03-13 14:01:08 +00:00
Stefan Wallström
b7ff643a34
Fixed: when clicking and dragging inside a menu, mouseEntered and mouseExited was mixed up for custom views.
2013-02-27 22:26:52 +01:00
Aparajita Fishman
347270a8b8
Formatting
2013-02-16 18:09:04 -05:00
Blair Duncan
9c4317783b
main menubar looping cursor navigation
2013-02-16 17:26:19 -05:00
Aparajita Fishman
b2fa60ae08
Based on further testing, it seems .4 seconds is the Cocoa sticky time
2013-02-02 08:29:54 +08:00
Antoine Mercadal
cbaf562c44
Revert back the sticky time to 0.5
2013-02-01 16:24:45 -08:00
Antoine Mercadal
351ee1a54e
Increase the menu sticky interval to 0.2
2013-02-01 15:20:42 -08:00
Antoine Mercadal
b3bf190e10
Reduce the menu sticky interval to 0.1 which improve UX and is more like Cocoa behavior
2013-01-31 13:10:44 -08:00
Aparajita Fishman
4f377bcebe
Objj2 compiler fixes
...
Compiled all files individually:
- Added missing imports.
- Added @class/@global declarations to break circular dependencies.
- Misc. code cleanup.
Conflicts:
AppKit/CPWindow/_CPWindow.j
AppKit/Platform/DOM/CPPlatformWindow+DOM.j
2013-01-23 15:48:55 +07:00
Antoine Mercadal
1a61fc832e
Fix a bug in wrong code order in _CPMenuManager.j making usage of undeclared variable. Also add some missing imports
2013-01-18 10:16:55 -08:00
Martin Carlberg
458fa9d02e
Fixed a lot of small bugs found by new warning message from compiler
2013-01-18 14:24:37 +01:00
Blair Duncan
eeceaa0c9b
unlite if mouse is moved off and cursor up hilites last item if none
2012-06-01 20:17:09 -04:00
Blair Duncan
d6429e532b
typo fix
2012-04-24 00:02:12 -04:00
Blair Duncan
864db16e33
Fix for issue 1491, don't scroll if active menu container is menubar
2012-04-23 23:54:13 -04:00
Blair Duncan
02ebb6e4f7
highlite menu item only if the active item was found
2012-04-23 23:06:31 -04:00
Blair Duncan
5b5034da63
CPEvent - send a valid timestamp for periodic events
2012-04-23 18:19:37 -04:00
Blair Duncan
5b6779a3a9
Fix for menu selection that was broken with the change to CPEvent timestamp
2012-04-23 16:51:10 -04:00
Aparajita Fishman
5763ebdf2b
Fixed CPEvent -timestamp to return seconds since startup, as documented in Cocoa.
...
Miscellaneous cleanup of timestamp usage as well.
2012-04-15 11:30:27 -04:00
Aparajita Fishman
e2ead56256
Collection KVC fixes, nextObject correctness
...
- Moved common CPArray/CPSet collection KVC operators to _CPCollectionKVCOperators.
- Implemented KVC operator dispatch using Objective-J.
- Fixed infinite loop with empty collection in @min, @max and @sum operators.
- Correctly return valueForUndefinedKey when necessary.
- valueForUndefinedKey reason uses raw description for consistency, class' overridden description may not helpful at all.
- Don't create a forwarder for @ operators with property paths.
- Fixed CPSet -valueForKeyPath to correctly deal with nil/undefined/empty values.
- Added tests for collection KVC operators.
- enumerator -nextObject should always compare against nil for clarity, correctness, and consistency.
2012-04-03 22:16:55 -07:00
Aparajita Fishman
d68278e41f
Use isMenuBar instead of testing class
2012-03-27 11:19:41 -07:00
Aparajita Fishman
cd148c36c9
Menu tracking fixes:
...
- Finally fixed #1457 .
- Fixed case where mouse is dragged and then released over a submenu, which should release the menu.
- Fixed case where clicking without dragging, then clicking again on a menu title would not close the menu.
2012-03-26 12:38:50 -07:00
Alexander Ljungberg
3cee00323c
Don't separate statements by commas.
2011-11-10 12:31:16 +00:00
Klaas Pieter Annema
f0561844d8
don't close a menu item with a submenu
...
A submenu item should only close the menu if it has a non default action.
This is compliant with how Cocoa behavior.
2011-07-21 12:23:11 +02:00
Klaas Pieter Annema
edcee8934d
fix empty contextual menus out of bounds error
2011-07-14 16:26:58 +02:00
Klaas Pieter Annema
d115d2ef47
fix context menu only closes after two clicks
...
This is a regression from 73b4c33f05 .
Because we were only tracking wether the left mouse button went up after a contextual menu (which is opened with the right mouse)
would only close after the second left mouse up.
2011-07-14 11:15:34 +02:00
Klaas Pieter Annema
73b4c33f05
track if the mouse was released after menu open
...
Make sure the menu isn't closed by the mouse up that is directly followed by the mouse down that opened the menu.
2011-07-07 16:04:10 +02:00
Klaas Pieter Annema
ad30f4dcbb
call delegate when submenu open and close
2011-07-07 16:04:10 +02:00
Klaas Pieter Annema
2b6fddf26c
move menu delegate logic to generic methods
2011-07-07 16:04:04 +02:00
Aparajita Fishman
bb3ed30b4e
Style cleanup
2011-05-15 12:15:00 -07:00
Klaas Pieter Annema
dc264231c8
open menu bar menus directly
2011-04-20 08:58:30 +02:00
Klaas Pieter Annema
a9f23fe082
open submenus after a short delay
2011-03-04 10:21:26 +01:00
Klaas Pieter Annema
3c77d43e03
implement mousewheel support for CPMenu
2011-03-04 10:21:26 +01:00
Klaas Pieter Annema
566fdf6400
lint _CPMenuManager.j
2011-03-04 10:21:25 +01:00
Blair Duncan and Klaas Pieter Annema
7d7c037682
add support for Home and End key and modified logic for pageUp and pageDown
2011-03-04 10:20:54 +01:00
Blair Duncan and Klaas Pieter Annema
bf72a7f92d
added support for escape key to cancel menus, removed unused var
2011-03-04 10:20:54 +01:00
Blair Duncan and Klaas Pieter Annema
df9387fc78
remove unneccessary scrolling calls and periodic events when not needed
2011-03-04 10:20:54 +01:00
Blair Duncan and Klaas Pieter Annema
9296df89df
fixed some spacing and added a delay in the reset time for longer lists
2011-03-04 10:19:35 +01:00
Blair Duncan and Klaas Pieter Annema
d4d65ed4d7
Add support for keyboard navigation in menus
2011-03-04 10:19:35 +01:00
Alexander Ljungberg
dedf3cd90f
More AppKit coding standards.
2011-02-28 23:55:29 -03:00
Francisco Ryan Tolmasky I
52f7844aee
Made it so .h files are automatically included in AppKit (avoiding needing to manually include Platform.h, etc.).
...
Also changed a bunch of <AppKit/*> imports to "*" imports.
Reviewed by me.
2010-11-01 11:10:01 -07:00
Scott Kyle and Randall Luecke
1899250a53
Semicolons are nice...
2010-06-10 16:42:28 -05:00
Francisco Ryan Tolmasky I
d879b25458
Re-enabled menu bar button support.
...
Closes #410 .
Reviewed by me.
2010-02-22 02:12:11 -08:00
Francisco Ryan Tolmasky I
a9bc949679
Actual fix for disabled items in CPMenu. Previous fix still selected disabled items and showed submenus for disabled items.
...
Reviewed by me.
2009-12-18 22:31:12 -08:00
Francisco Ryan Tolmasky I
0eff4e2bc0
Fix for moving to a base menu resetting the child menu.
...
Reviewed by me.
2009-12-03 17:58:49 -08:00
Francisco Ryan Tolmasky I
f250373673
Fix for actions not being sent in submenus.
...
Reviewed by me.
2009-12-03 00:42:13 -08:00
Francisco Ryan Tolmasky I
b0acc13da7
Fix for exceptions when not on a menu item.
...
Reviewed by me.
2009-12-02 23:08:33 -08:00
Francisco Ryan Tolmasky I
348e45a5cd
Some cleanup and a fix for custom views in menus.
...
Reviewed by me.
2009-12-02 18:40:47 -08:00
Francisco Ryan Tolmasky I
0b3c313280
Fix for highlight look in menu bars.
...
Reviewed by me.
2009-12-02 18:12:50 -08:00
Francisco Ryan Tolmasky I
78795e3167
Preliminary menu bar support.
...
Reviewed by me.
2009-12-02 15:57:52 -08:00