arrange refactor and scroll widget

This commit is contained in:
Will McGugan
2022-03-15 17:46:44 +00:00
parent 924683b427
commit 94a0374067
6 changed files with 83 additions and 29 deletions

View File

@@ -205,6 +205,9 @@ class ScrollBar(Widget):
style=style,
)
async def on_event(self, event) -> None:
await super().on_event(event)
async def on_enter(self, event: events.Enter) -> None:
self.mouse_over = True
@@ -235,7 +238,7 @@ class ScrollBar(Widget):
self.grabbed = None
async def on_mouse_move(self, event: events.MouseMove) -> None:
if self.grabbed:
if self.grabbed and self.window_size:
x: float | None = None
y: float | None = None
if self.vertical: