Rename PercentageProperty to FractionalProperty

This commit is contained in:
Darren Burns
2022-02-11 11:51:06 +00:00
parent 80251e3234
commit 50327f5b5a
3 changed files with 3 additions and 3 deletions

View File

@@ -775,7 +775,7 @@ class TransitionsProperty:
obj.set_rule("transitions", transitions.copy()) obj.set_rule("transitions", transitions.copy())
class PercentageProperty: class FractionalProperty:
"""Property that can be set either as a float (e.g. 0.1) or a """Property that can be set either as a float (e.g. 0.1) or a
string percentage (e.g. '10%'). Values will be clamped to the range (0, 1). string percentage (e.g. '10%'). Values will be clamped to the range (0, 1).
""" """

View File

@@ -28,7 +28,7 @@ from ._style_properties import (
StyleFlagsProperty, StyleFlagsProperty,
StyleProperty, StyleProperty,
TransitionsProperty, TransitionsProperty,
PercentageProperty, FractionalProperty,
) )
from .constants import VALID_DISPLAY, VALID_VISIBILITY from .constants import VALID_DISPLAY, VALID_VISIBILITY
from .scalar import Scalar, ScalarOffset, Unit from .scalar import Scalar, ScalarOffset, Unit
@@ -124,7 +124,7 @@ class StylesBase(ABC):
text_background = ColorProperty() text_background = ColorProperty()
text_style = StyleFlagsProperty() text_style = StyleFlagsProperty()
opacity = PercentageProperty() opacity = FractionalProperty()
padding = SpacingProperty() padding = SpacingProperty()
margin = SpacingProperty() margin = SpacingProperty()

View File