mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Move disabled out of Button and into Widget
This doesn't go close to what #1748 is intending to do, but moves `disabled` to where I want it and keeps `Button` working as before.
This commit is contained in:
@@ -225,6 +225,8 @@ class Widget(DOMNode):
|
||||
"""Rich renderable may shrink."""
|
||||
auto_links = Reactive(True)
|
||||
"""Widget will highlight links automatically."""
|
||||
disabled = Reactive(False)
|
||||
"""The disabled state of the widget. `True` if disabled, `False if not."""
|
||||
|
||||
hover_style: Reactive[Style] = Reactive(Style, repaint=False)
|
||||
highlight_link_id: Reactive[str] = Reactive("")
|
||||
|
||||
@@ -156,9 +156,6 @@ class Button(Static, can_focus=True):
|
||||
variant = reactive("default")
|
||||
"""The variant name for the button."""
|
||||
|
||||
disabled = reactive(False)
|
||||
"""The disabled state of the button; `True` if disabled, `False` if not."""
|
||||
|
||||
class Pressed(Message, bubble=True):
|
||||
"""Event sent when a `Button` is pressed.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user