Hide the mouse when the user is typing in the editor (#25040)
Closes https://github.com/zed-industries/zed/issues/4461 This PR improves the coding experience by hiding the mouse while the user is typing so it does not accidentally get in their way, making it challenging to ready characters in the editor. Release Notes: - The following PR hides the cursor when the user is typing by adding a new cursor style called `None`. - Assuming the user does not move the mouse, it will stay hidden until it is moved again. https://github.com/user-attachments/assets/6ba9f2ee-b9f3-4595-81e4-e9d986da4a39 --------- Co-authored-by: Agus <agus@zed.dev> Co-authored-by: Peter Tripp <peter@zed.dev> Co-authored-by: Kirill Bulatov <kirill@zed.dev>
This commit is contained in:
parent
3116850688
commit
a8610fbd13
17 changed files with 127 additions and 28 deletions
|
@ -326,6 +326,13 @@ pub fn cursor_style_methods(input: TokenStream) -> TokenStream {
|
|||
self.style().mouse_cursor = Some(gpui::CursorStyle::ResizeLeft);
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets cursor style when hovering over an element to `none`.
|
||||
/// [Docs](https://tailwindcss.com/docs/cursor)
|
||||
#visibility fn cursor_none(mut self, cursor: CursorStyle) -> Self {
|
||||
self.style().mouse_cursor = Some(gpui::CursorStyle::None);
|
||||
self
|
||||
}
|
||||
};
|
||||
|
||||
output.into()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue