|
@@ -85,30 +85,30 @@ class BindVisibilityMixin:
|
|
|
"""
|
|
|
Mixin providing bind methods for attribute visible.
|
|
|
"""
|
|
|
- visibility = BindableProperty(on_change=lambda sender, visibility: sender.on_visibility_change(visibility))
|
|
|
+ visible = BindableProperty(on_change=lambda sender, visible: sender.on_visibility_change(visible))
|
|
|
|
|
|
- def bind_visibility_to(self, target_object: Any, target_name: str = 'visibility', forward: Callable = lambda x: x):
|
|
|
+ def bind_visibility_to(self, target_object: Any, target_name: str = 'visible', forward: Callable = lambda x: x):
|
|
|
bind_to(self, 'visible', target_object, target_name, forward)
|
|
|
return self
|
|
|
|
|
|
- def bind_visibility_from(self, target_object: Any, target_name: str = 'visibility',
|
|
|
+ def bind_visibility_from(self, target_object: Any, target_name: str = 'visible',
|
|
|
backward: Callable = lambda x: x, *, value: Any = None):
|
|
|
if value is not None:
|
|
|
def backward(x): return x == value
|
|
|
bind_from(self, 'visible', target_object, target_name, backward)
|
|
|
return self
|
|
|
|
|
|
- def bind_visibility(self, target_object: Any, target_name: str = 'visibility', *,
|
|
|
+ def bind_visibility(self, target_object: Any, target_name: str = 'visible', *,
|
|
|
forward: Callable = lambda x: x, backward: Callable = lambda x: x, value: Any = None):
|
|
|
if value is not None:
|
|
|
def backward(x): return x == value
|
|
|
bind(self, 'visible', target_object, target_name, forward=forward, backward=backward)
|
|
|
return self
|
|
|
|
|
|
- def set_visibility(self, visibility: str) -> None:
|
|
|
- self.visibility = visibility
|
|
|
+ def set_visibility(self, visible: str) -> None:
|
|
|
+ self.visible = visible
|
|
|
|
|
|
- def on_visibility_change(self, visibility: str) -> None:
|
|
|
+ def on_visibility_change(self, visible: str) -> None:
|
|
|
pass
|
|
|
|
|
|
|