Commit Graph
117 Commits
Author SHA1 Message Date
Mikayla MakiandAntonio 310d867aab Switch PopUp windows to use the NSTrackingArea API and add support for the mouseExited event
Co-authored-by: Antonio <antonio@zed.dev>
2023-01-20 16:35:25 -08:00
Mikayla Maki 5a00729fad Merge pull request #2051 from zed-industries/show-following-to-followed
Show following to followed
2023-01-20 09:23:34 -08:00
Mikayla MakiandNathan 95e661a78c Switched from active hover to NSViews acceptsFirstMouse API
Co-authored-by: Nathan <nathan@zed.dev>
2023-01-20 09:14:38 -08:00
Julia ad1947fa50 Add in-window on-move-out mouse handler concept 2023-01-19 12:34:13 -05:00
Max Brunsfeld 373902d933 Add '>' child operator in keymap context predicates 2023-01-16 16:00:46 -08:00
Kay Simmons 73e7967a12 working f and t bindings 2023-01-06 14:24:20 -08:00
Mikayla Makiand 4798161118 Distributed database pattern built.
Co-Authored-By: kay@zed.dev
2022-12-03 16:06:01 -08:00
K Simmons 0c466f806c WIP 2022-12-03 16:04:10 -08:00
Kay Simmons 75b8a12ab3 address issue where mouse down events weren't getting captured after the multiple handlers change 2022-11-18 13:04:27 -08:00
JuliaandKay Simmons 6537def97e Allow having multiple mouse event handlers of the same kind
Co-Authored-By: Kay Simmons <kay@zed.dev>
2022-11-17 17:01:34 -05:00
Antonio Scandurra 2b4fd53202 Rename height to z-index 2022-10-25 13:47:12 +02:00
Antonio Scandurra dfe2fd0386 Allow specifying a custom height for stacking contexts 2022-10-25 13:41:47 +02:00
Antonio Scandurra 33ebfc3f10 Rename depth to height when referring to stacking contexts 2022-10-25 12:18:23 +02:00
Antonio Scandurra 6a4f3aaa56 Create a SceneBuilder and sort stacking contexts when calling build 2022-10-25 12:16:09 +02:00
K Simmons aed085b168 remove unnecessary Move branch in dispatch_events 2022-10-24 23:32:01 -07:00
K Simmons 345544646a remove more notify on moves 2022-10-24 23:32:01 -07:00
K Simmons 4520227e98 remove mouse position from render params 2022-10-24 23:32:01 -07:00
K Simmons f5795ffc6f roll back mouse position in mouse_state struct in favor of using the dragged element position 2022-10-24 23:32:01 -07:00
K Simmons d7b8a189e4 fix issue where empty pane is created 2022-10-24 23:32:00 -07:00
K Simmons cfde3e348c Add pane splitting by dragged item. Works, but the overlay doesn't clear quite right 2022-10-24 23:31:58 -07:00
K Simmons 70e2951e35 add mouse region handler bool for adding the handler above the child 2022-10-24 23:30:35 -07:00
JuliaandKay Simmons b9f9819637 Handle tab drag end on pane items to insert after active item
Co-Authored-By: Kay Simmons <kay@zed.dev>
2022-10-24 23:30:35 -07:00
Nathan Sobo 12eab6551f Remove dispatch_event from Element trait 2022-10-16 13:08:25 -06:00
Nathan Sobo 6e363e464c Start on view-level dispatch approach for keyboard events 2022-10-16 11:46:31 -06:00
Nathan Sobo 6e53deb1b2 Refine mouse event naming 2022-10-16 11:18:58 -06:00
Nathan SoboandMax Brunsfeld bc03592912 Only invalidate parent view on click/hover if we read that state when rendering
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-10-14 18:09:15 -06:00
Nathan Sobo 934474f87e Remove unconditional invalidation when calling mouse region handlers
We want invalidation to opt-in as much as possible.
If you want a view to re-render, you need to call `cx.notify`.
2022-10-14 17:06:46 -06:00
Antonio ScandurraandNathan Sobo 9ebd586350 Improve error message when rendering a child view for a dropped view
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-10-13 16:40:52 +02:00
Antonio Scandurra a5a60eb854 Log view name alongside error in ChildView 2022-10-13 15:44:01 +02:00
Antonio Scandurra edb61a9c8f Avoid panicking if child view points to a view that was not rendered 2022-10-13 15:11:57 +02:00
Antonio Scandurra 06dfb74663 Prevent ChildView from retaining an otherwise dropped view 2022-10-13 15:04:57 +02:00
Antonio Scandurra 9efa39e81e Merge branch 'main' into capture 2022-09-15 12:02:07 +02:00
Antonio Scandurra f67e2bea29 Refresh windows when OS appearance changes 2022-09-14 11:47:43 +02:00
K SimmonsandMikayla Maki 0b5952e1bd Fix incorrect rendering of toolbar in right anchored dock
Make dock keybinding activate the dock if it wasn't hidden, and hide it if it was already active
Make clicking the expanded dock wash, hide the dock
Fix some issues with programmatically activating other panes, not hiding the dock
Tweak dock anchor menu text
Swap dock hide button for thin variant
Fix dock sidebar interactions
Add clicked state to search button and fix presenter issue sending clicked events when mouse not overlapping MouseRegion

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-13 15:17:27 -07:00
K Simmons 6bc17cc9a4 Fix remaining test failures 2022-09-13 13:17:49 -07:00
K SimmonsandMikayla Maki 6b26965074 Permanent fix to repeat MouseRegion Tag failure in Workspace
Polish tab bar buttons

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-11 15:34:10 -07:00
K SimmonsandMikayla Maki 69ecbb644d DOCK WORKING!
Update editor element to use mouse regions instead of dispatch event for mouse events
Fix bug in presenter where mouse region handlers were stored on click and called instead of more up to date handlers from subsequent renders
Changed MouseRegion to require discriminants in all cases
Add scroll wheel event to MouseRegion
Polished a bunch of dock inconsistencies

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-11 15:32:20 -07:00
K Simmons 28965dc5b6 Make MouseRegion Click handlers, also handle Down events by default. 2022-09-11 14:19:35 -07:00
K Simmons 227cc66594 Simulate mouse up if mouse was released outside window, don't report dragged payload if it was dragged from a different window 2022-08-31 14:06:38 -07:00
K Simmons 3cc07c1099 Fix some drag and drop issues including the mouse cursor not being locked to pointer, tooltips being incorrect when a dragged tab is used, and some subscription leaks from panes 2022-08-26 15:43:15 -07:00
K Simmons 042ece00b1 Drag and drop tabs working. all known bugs fixed 2022-08-25 11:14:24 -07:00
K Simmons de3acbd75b Introduce ReorderBehavior to pane, and address drag and drop offset error 2022-08-23 15:41:59 -07:00
K Simmons 13e9336049 Merge branch 'main' into drag-and-drop 2022-08-22 17:18:29 -07:00
K Simmons e44536344a Removed EventHandler from workspace in favor of mouse event handler 2022-08-22 16:49:14 -07:00
K Simmons 0f43ef9331 Dispatch Event refactoring. Appears to be workingCo-Authored-By: nathan@zed.dev 2022-08-22 16:16:40 -07:00
K Simmons b97940be9b more wip but currently beach balling 2022-08-22 16:16:39 -07:00
K Simmons 3fb4e6356c Rework presenter dispatch_event to allow isolated propogation of individual MouseRegionEvent types Co-Authored-By: mikayla@zed.dev 2022-08-22 16:16:39 -07:00
K Simmons 0d6125889f WIP 2022-08-22 16:16:39 -07:00
K Simmons ab9f073443 fixed merge errors 2022-08-22 16:16:39 -07:00
K Simmons 133c194f4a wip tab drag and drop 2022-08-22 16:16:39 -07:00