Fix scrollbar not updating with CSS

This commit is contained in:
Will McGugan
2022-05-30 20:14:53 +01:00
parent 789ea1e300
commit 9128b7e3ba
3 changed files with 5 additions and 2 deletions

View File

@@ -214,7 +214,6 @@ class Compositor:
Returns:
ReflowResult: Hidden shown and resized widgets
"""
print("REFLOW")
self._cuts = None
self.root = parent
self.size = size

View File

@@ -380,6 +380,11 @@ class Stylesheet:
apply = self.apply
for node in root.walk_children():
apply(node, animate=animate)
if isinstance(node, Widget):
if node.show_vertical_scrollbar:
apply(node.vertical_scrollbar)
if node.show_horizontal_scrollbar:
apply(node.horizontal_scrollbar)
if __name__ == "__main__":

View File

@@ -181,7 +181,6 @@ class Screen(Widget):
self.check_idle()
async def handle_layout(self, message: messages.Layout) -> None:
print("LAYOUT")
message.stop()
message.prevent_default()
self._layout_required = True