enthought / chaco

Chaco is a Python package for building interactive and custom 2-D plots.
http://docs.enthought.com/chaco/
Other
292 stars 99 forks source link

`TextBoxOverlay` incorrectly overrides `Component.padding` #820

Open corranwebster opened 2 years ago

corranwebster commented 2 years ago

Problem Description

The base Component class has a padding trait which is a Property that can take a number of different values, but TextBoxOverlay which is a subclass of Component, overrides this as an Int.

This is used as a margin around all sides of the text inside the component's rectangle, rather than the padding outside the rectangle.

A simple fix would be to re-name the trait on TextBoxOverlay to something else (eg. text_padding or margin).