mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
replace hack in scrollbars
This commit is contained in:
@@ -49,7 +49,7 @@ def style_links(
|
|||||||
_Segment(
|
_Segment(
|
||||||
text,
|
text,
|
||||||
(style + link_style if style is not None else None)
|
(style + link_style if style is not None else None)
|
||||||
if (style and style._link_id == link_id)
|
if (style and not style._null and style._link_id == link_id)
|
||||||
else style,
|
else style,
|
||||||
control,
|
control,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ class ScrollBar(Widget):
|
|||||||
self.thickness = thickness
|
self.thickness = thickness
|
||||||
self.grabbed_position: float = 0
|
self.grabbed_position: float = 0
|
||||||
super().__init__(name=name)
|
super().__init__(name=name)
|
||||||
|
self.auto_links = False
|
||||||
|
|
||||||
window_virtual_size: Reactive[int] = Reactive(100)
|
window_virtual_size: Reactive[int] = Reactive(100)
|
||||||
window_size: Reactive[int] = Reactive(0)
|
window_size: Reactive[int] = Reactive(0)
|
||||||
@@ -222,17 +223,6 @@ class ScrollBar(Widget):
|
|||||||
if self.thickness > 1:
|
if self.thickness > 1:
|
||||||
yield "thickness", self.thickness
|
yield "thickness", self.thickness
|
||||||
|
|
||||||
@property
|
|
||||||
def link_style(self) -> Style:
|
|
||||||
return NULL_STYLE
|
|
||||||
|
|
||||||
@property
|
|
||||||
def link_hover_style(self) -> Style:
|
|
||||||
return NULL_STYLE
|
|
||||||
|
|
||||||
def watch_hover_style(self, old_style: Style, new_style: Style) -> None:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def render(self) -> RenderableType:
|
def render(self) -> RenderableType:
|
||||||
styles = self.parent.styles
|
styles = self.parent.styles
|
||||||
background = (
|
background = (
|
||||||
|
|||||||
Reference in New Issue
Block a user