mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
fixed css monitor
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user