This commit is contained in:
Rodrigo Girão Serrão
2023-01-04 14:49:06 +00:00
parent aaad1a310a
commit 906fc6e216

View File

@@ -225,14 +225,15 @@ class ScrollBar(Widget):
def render(self) -> RenderableType: def render(self) -> RenderableType:
styles = self.parent.styles styles = self.parent.styles
background = ( if self.grabbed:
styles.scrollbar_background_hover background = styles.scrollbar_background_active
if self.mouse_over color = styles.scrollbar_color_active
else styles.scrollbar_background elif self.mouse_over:
) background = styles.scrollbar_background_hover
color = ( color = styles.scrollbar_color_hover
styles.scrollbar_color_active if self.grabbed else styles.scrollbar_color else:
) background = styles.scrollbar_background
color = styles.scrollbar_color
color = background + color color = background + color
scrollbar_style = Style.from_color(color.rich_color, background.rich_color) scrollbar_style = Style.from_color(color.rich_color, background.rich_color)
return ScrollBarRender( return ScrollBarRender(