mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Inline border invalid number of edges help text
This commit is contained in:
@@ -85,7 +85,7 @@ class BasicApp(App):
|
|||||||
|
|
||||||
def action_increase_margin(self):
|
def action_increase_margin(self):
|
||||||
old_margin = self.focused.styles.margin
|
old_margin = self.focused.styles.margin
|
||||||
self.focused.styles.border = [("solid", "green"), ("dashed", "s")]
|
self.focused.styles.border = [("solid", "green"), ("dashed", "red")]
|
||||||
|
|
||||||
|
|
||||||
BasicApp.run(css_file="uber.css", log="textual.log", log_verbosity=1)
|
BasicApp.run(css_file="uber.css", log="textual.log", log_verbosity=1)
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ def border_property_help_text(
|
|||||||
f'widget.styles.{property_name} = ("solid", "red")'
|
f'widget.styles.{property_name} = ("solid", "red")'
|
||||||
),
|
),
|
||||||
Example(
|
Example(
|
||||||
f'widget.styles.{property_name} = ("round", #f0f0f0")'
|
f'widget.styles.{property_name} = ("round", "#f0f0f0")'
|
||||||
),
|
),
|
||||||
Example(
|
Example(
|
||||||
f'widget.styles.{property_name} = [("dashed", "#f0f0f0"), ("solid", "blue")] [dim]# Vertical, horizontal'
|
f'widget.styles.{property_name} = [("dashed", "#f0f0f0"), ("solid", "blue")] [dim]# Vertical, horizontal'
|
||||||
|
|||||||
@@ -341,7 +341,10 @@ class BorderProperty:
|
|||||||
setattr(obj, bottom, _border3)
|
setattr(obj, bottom, _border3)
|
||||||
setattr(obj, left, _border4)
|
setattr(obj, left, _border4)
|
||||||
else:
|
else:
|
||||||
raise StyleValueError("expected 1, 2, or 4 values")
|
raise StyleValueError(
|
||||||
|
"expected 1, 2, or 4 values",
|
||||||
|
help_text=border_property_help_text(self.name, context="inline"),
|
||||||
|
)
|
||||||
obj.refresh(layout=self._layout)
|
obj.refresh(layout=self._layout)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user