Add col/row resize cursor styles (#11406)
This PR fixes a small issue I noticed with resize cursors. The column/row resize cursors were missing and in a few places we were using `ew-resize` and `ns-resize` even though the documentation mentions `col-resize` and `row-resize`. Finally updated the panes in the workspace to use the new column/row resize cursors. Before:   After:   Release Notes: - Added column/row resize cursor styles to GPUI - Fixed the existing references that were incorrectly using `ew-resize` for column resize and `ns-resize` for row resize - Updated panes to use column/row resize cursors instead on `ew-resize` and `ns-resize` --------- Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
f3fffc25c4
commit
da6a6ec36b
5 changed files with 34 additions and 6 deletions
|
@ -176,17 +176,31 @@ pub trait Styled: Sized {
|
|||
self
|
||||
}
|
||||
|
||||
/// Sets cursor style when hovering over an element to `ew-resize`.
|
||||
/// [Docs](https://tailwindcss.com/docs/cursor)
|
||||
fn cursor_ew_resize(mut self) -> Self {
|
||||
self.style().mouse_cursor = Some(CursorStyle::ResizeLeftRight);
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets cursor style when hovering over an element to `ns-resize`.
|
||||
/// [Docs](https://tailwindcss.com/docs/cursor)
|
||||
fn cursor_ns_resize(mut self) -> Self {
|
||||
self.style().mouse_cursor = Some(CursorStyle::ResizeUpDown);
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets cursor style when hovering over an element to `col-resize`.
|
||||
/// [Docs](https://tailwindcss.com/docs/cursor)
|
||||
fn cursor_col_resize(mut self) -> Self {
|
||||
self.style().mouse_cursor = Some(CursorStyle::ResizeLeftRight);
|
||||
self.style().mouse_cursor = Some(CursorStyle::ResizeColumn);
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets cursor style when hovering over an element to `row-resize`.
|
||||
/// [Docs](https://tailwindcss.com/docs/cursor)
|
||||
fn cursor_row_resize(mut self) -> Self {
|
||||
self.style().mouse_cursor = Some(CursorStyle::ResizeUpDown);
|
||||
self.style().mouse_cursor = Some(CursorStyle::ResizeRow);
|
||||
self
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue