Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions enable/gadgets/vu_meter.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ class VUMeter(Component):
_outer_radial_margin = Float(60.0)

# The angle (in radians) of the span of the curve axis.
_phi = Property(Float, depends_on=["angle"])
_phi = Property(Float, observe=["angle"])

# This is the radius of the circular axis (in screen coordinates).
_axis_radius = Property(Float, depends_on=["_phi", "width", "height"])
_axis_radius = Property(Float, observe=["_phi", "width", "height"])

# ---------------------------------------------------------------------
# Trait Property methods
Expand Down
6 changes: 3 additions & 3 deletions enable/primitives/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ class Image(Component):
data = Array(shape=(None, None, (3, 4)), dtype="uint8")

#: the format of the image data (eg. RGB vs. RGBA)
format = Property(Enum("rgb24", "rgba32"), depends_on="data")
format = Property(Enum("rgb24", "rgba32"), observe="data")

#: the size-hint for constraints-based layout
layout_size_hint = Property(data, depends_on="data")
layout_size_hint = Property(data, observe="data")

#: the image as a C-contiguous ndarray
_image = Property(Array(shape=(None, None, None)), depends_on="data")
_image = Property(Array(shape=(None, None, None)), observe="data")

@classmethod
def from_file(cls, filename, **traits):
Expand Down
4 changes: 2 additions & 2 deletions enable/savage/compliance/comparator.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class Comparator(HasTraits):

# The currently selected SVG file.
current_file = Str()
abs_current_file = Property(depends_on=["current_file"])
abs_current_file = Property(observe=["current_file"])

# The current XML ElementTree root Element and its XMLTree view model.
current_xml = Any()
Expand All @@ -116,7 +116,7 @@ class Comparator(HasTraits):

# The text showing the current mouse coordinates over any of the
# components.
mouse_coords = Property(Str, depends_on=["ch_controller.svg_coords"])
mouse_coords = Property(Str, observe=["ch_controller.svg_coords"])

# Move forward and backward through the list of SVG files.
move_forward = Button(">>")
Expand Down
6 changes: 3 additions & 3 deletions enable/text_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TextField(Component):
# ------------------------------------------------------------------------

# The text to be edited
text = Property(depends_on=["_text_changed"])
text = Property(observe=["_text_changed"])

# Events that get fired on certain keypresses
accept = Event
Expand Down Expand Up @@ -74,10 +74,10 @@ class TextField(Component):

# The max width/height of the displayed text in characters
_text_width = Property(
depends_on=["_style", "height"], cached="_height_cache"
observe=["_style", "height"], cached="_height_cache"
)
_text_height = Property(
depends_on=["_style", "width"], cached="_width_cache"
observe=["_style", "width"], cached="_width_cache"
)

# The x-y position of the cursor in the text
Expand Down
2 changes: 1 addition & 1 deletion enable/tools/drag_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class DragTool(BaseTool):

# private property to hold the current list of KeySpec instances of the
# cancel keys
_cancel_keys = Property(List(KeySpec), depends_on="cancel_keys")
_cancel_keys = Property(List(KeySpec), observe="cancel_keys")
Comment thread
aaronayres35 marked this conversation as resolved.

# ------------------------------------------------------------------------
# Interface for subclasses
Expand Down
2 changes: 1 addition & 1 deletion kiva/examples/kiva/kiva_explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class ScriptedComponent(Component):

#: how long did the last draw take
last_draw_time = Float(0.0)
fps_display = Property(Str, depends_on="last_draw_time")
fps_display = Property(Str, observe="last_draw_time")

#: compiled code
_draw_code = Any
Expand Down