Style resize handles
We want the draggable area to be larger than the visual appearance, so we added a padding facility to MouseEventHandler that enlarges the "hit area" by the specified padding. Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
co-authored by
Max Brunsfeld
parent
8085e74b98
commit
13143e64a2
@@ -158,6 +158,11 @@ impl Sidebar {
|
||||
.with_style(&self.theme(settings).resize_handle)
|
||||
.boxed()
|
||||
})
|
||||
.with_padding(Padding {
|
||||
left: 4.,
|
||||
right: 4.,
|
||||
..Default::default()
|
||||
})
|
||||
.with_cursor_style(CursorStyle::ResizeLeftRight)
|
||||
.on_drag(move |delta, cx| {
|
||||
let prev_width = *width.borrow();
|
||||
|
||||
Reference in New Issue
Block a user