Commit graph

124 commits

Author SHA1 Message Date
Mikayla Maki
8e6c5dbc3b Fix unscaled scrolling when using an imprecise mouse wheel 2022-11-16 10:44:13 -08:00
Antonio Scandurra
ddc71653ad Maintain scroll position in contacts list
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-10-25 18:36:33 +02: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
K Simmons
113b7f6f97 tweak drop target overlay color and make stack fully constraint children by the first child
's size
2022-10-24 23:47:43 -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
8cde64d3f6 extract dragged item target 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
Julia
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
f8e5a08324
Merge pull request #1764 from zed-industries/gpui-events
Eliminate dispatch_event on Element trait
2022-10-18 15:24:13 -06:00
Max Brunsfeld
26ccd70e77 Scroll horizontal flex lists by whichever scroll delta dimension is greater 2022-10-18 12:59:04 -07:00
Nathan Sobo
12eab6551f Remove dispatch_event from Element trait 2022-10-16 13:08:25 -06:00
Nathan Sobo
6e53deb1b2 Refine mouse event naming 2022-10-16 11:18:58 -06:00
Nathan Sobo
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
Nathan Sobo
8d82702da2 Pass the current view id value when painting List's mouse region
Previously, a dummy value was being passed. I think this slipped in accidentally.
2022-10-13 15:57:19 -06:00
Antonio Scandurra
45d118f96f Decide whether to clip to visible bounds on a per-element basis
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-10-11 17:05:13 +02:00
Antonio Scandurra
9d990ae329 Show all room participants in titlebar
...and allow following them into external projects.
2022-10-10 14:20:45 +02:00
Mikayla Maki
4bc0afdafa Finished terminal hyperlinks for now 2022-09-26 16:33:29 -07:00
Mikayla Maki
d2d49633f1 WIP, almost done with tooltips 2022-09-24 08:32:06 -07:00
Mikayla Maki
4761898d9b removed the last dispatch_event I could find 2022-09-22 10:31:29 -07:00
Mikayla Maki
dd7259c832 Finished fixing flex scrolls 2022-09-22 09:35:52 -07:00
Mikayla Maki
f4d4ea4123 WIP fixing scrollable flex 2022-09-21 23:26:42 -07:00
Mikayla Maki
ab7f7b3754 Added on_scroll to mouse_event_handler and fixed the uniform list scroll implementation 2022-09-21 22:23:07 -07: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 Simmons
df59b28aaf Extract panel resize code from sidebar into Resizable element
Make resizable work in vertical axis
Make dock resizable
Have dock preserve size based on Anchor position
Make pane buttons work more correctly in pathological cases
Sync status bar dock button with dock visibility/anchor position

Co-Authored-By Mikayla Maki <mikayla@zed.dev>
2022-09-12 18:32:15 -07:00
Mikayla Maki
31a3fdb23e Started to make the dock better, major issue's resizing child elements 2022-09-12 14:53:26 -07:00
K Simmons
f2b72eb6d2 WIP working on resizable dock 2022-09-12 14:24:57 -07:00
K Simmons
444417203b Move workspace overlay elements into an actual overlay in order to get proper stacking context depths
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-11 15:34:12 -07:00
K Simmons
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 Simmons
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
042ece00b1 Drag and drop tabs working. all known bugs fixed 2022-08-25 11:14:24 -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
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
133c194f4a wip tab drag and drop 2022-08-22 16:16:39 -07:00
K Simmons
a650c146f1 more event wip 2022-08-22 16:16:39 -07:00
Mikayla Maki
efd3247ce4 Added modifiers to scroll wheel eevent 2022-08-19 12:10:12 -07:00
ForLoveOfCats
8ba2f77148 One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
Antonio Scandurra
7b009c8bbe Merge branch 'main' into ime-support-2 2022-07-22 16:03:38 +02:00
Antonio Scandurra
97ce3998ec Position IME input according to where the selection is rendered 2022-07-21 17:35:40 +02:00
K Simmons
225055ed5d Address some issues where panes don't get focused properly, make the focused pane more obvious, and prevent splitting of the pane with no items 2022-07-20 18:52:32 -07:00
K Simmons
deeefed7eb Change mouse_event_handler to use HandlerSet 2022-07-18 10:08:14 -07:00
K Simmons
8add81350e Rework presenter and MouseRegion to use Handler hashmap rather than individual fields 2022-07-17 23:19:32 -07:00
Mikayla Maki
ca877245be Finished merge of drag update 2022-07-07 16:12:24 -07:00
Mikayla Maki
b2fa511acd GPUI change proposals 2022-07-06 17:52:20 -07:00
Keith Simmons
bcb553f233 Combine platform mouse events to use common MouseEvent struct and remove MouseDragged event in favor of MouseMoved 2022-07-06 16:37:56 -07:00