Skip to content

Commit

Permalink
Label: Prevent overwriting disabled_color attribute when color
Browse files Browse the repository at this point in the history
…is updated (#8667)

Ensure that when setting rules for color and disabled_color, refrain from overwriting color attributes if the label is disabled, allowing the label to be drawn using the disabled_color value.
  • Loading branch information
ikus060 committed Apr 8, 2024
1 parent c795305 commit c0d4894
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kivy/uix/label.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ def _trigger_texture_update(self, name=None, source=None, value=None):
self._label.options['outline_color'] = (
self.disabled_outline_color if value else
self.outline_color)
elif self.disabled and name in ('color', 'outline_color'):
# When disabled, color or outline_color changes should not get
# assigned or trigger updates.
return

# NOTE: Compatibility code due to deprecated properties
# Must be removed along with padding_x and padding_y
Expand Down

0 comments on commit c0d4894

Please sign in to comment.