fixed css monitor

This commit is contained in:
Will McGugan
2022-05-29 14:33:15 +01:00
parent c0ef0e2460
commit 2a521dfa2f
2 changed files with 4 additions and 4 deletions

View File

@@ -195,8 +195,8 @@ class App(Generic[ReturnType], DOMNode):
self._return_value: ReturnType | None = None
self.css_monitor = (
FileMonitor(css_path, self._on_css_change)
if ((watch_css or self.debug) and css_path)
FileMonitor(self.css_path, self._on_css_change)
if ((watch_css or self.debug) and self.css_path)
else None
)
@@ -726,7 +726,7 @@ class App(Generic[ReturnType], DOMNode):
if self.css_monitor:
self.set_interval(0.5, self.css_monitor, name="css monitor")
self.log("started", self.css_monitor)
self.log("[b green]STARTED[/]", self.css_monitor)
self._running = True
try:

View File

@@ -53,7 +53,7 @@ class VerticalLayout(Layout):
+ box_model.margin.left
)
next_y = y + content_height
region = Region(offset_x, int(y), int(content_width), int(next_y - int(y)))
region = Region(offset_x, int(y), int(content_width), int(next_y) - int(y))
add_placement(WidgetPlacement(region, widget, 0))
y = next_y + margin