mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Remove default scrollbars from Container
As per #2361 this removes default scrollbars on Container (and so adds them on ScrollableContainer).
This commit is contained in:
@@ -18,7 +18,7 @@ class Container(Widget):
|
|||||||
Container {
|
Container {
|
||||||
height: 1fr;
|
height: 1fr;
|
||||||
layout: vertical;
|
layout: vertical;
|
||||||
overflow: auto;
|
overflow: hidden hidden;
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -26,6 +26,13 @@ class Container(Widget):
|
|||||||
class ScrollableContainer(Widget, inherit_bindings=False):
|
class ScrollableContainer(Widget, inherit_bindings=False):
|
||||||
"""Base container widget that binds navigation keys for scrolling."""
|
"""Base container widget that binds navigation keys for scrolling."""
|
||||||
|
|
||||||
|
DEFAULT_CSS = """
|
||||||
|
ScrollableContainer {
|
||||||
|
layout: vertical;
|
||||||
|
overflow: auto auto;
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
BINDINGS: ClassVar[list[BindingType]] = [
|
BINDINGS: ClassVar[list[BindingType]] = [
|
||||||
Binding("up", "scroll_up", "Scroll Up", show=False),
|
Binding("up", "scroll_up", "Scroll Up", show=False),
|
||||||
Binding("down", "scroll_down", "Scroll Down", show=False),
|
Binding("down", "scroll_down", "Scroll Down", show=False),
|
||||||
|
|||||||
Reference in New Issue
Block a user