Skip to content
This repository has been archived by the owner on Jan 25, 2025. It is now read-only.

Commit

Permalink
update children's origin even if padding didn’t change
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Schott committed Feb 15, 2020
1 parent fed1f2d commit a4c6f71
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions travertino/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,23 +119,21 @@ def content_top(self):

@content_top.setter
def content_top(self, value):
if value != self._content_top:
self._content_top = value
for child in self.node.children:
if child.layout:
child.layout._origin_top = self.absolute_content_top
self._content_top = value
for child in self.node.children:
if child.layout:
child.layout._origin_top = self.absolute_content_top

@property
def content_left(self):
return self._content_left

@content_left.setter
def content_left(self, value):
if value != self._content_left:
self._content_left = value
for child in self.node.children:
if child.layout:
child.layout._origin_left = self.absolute_content_left
self._content_left = value
for child in self.node.children:
if child.layout:
child.layout._origin_left = self.absolute_content_left

######################################################################
# Absolute content box position
Expand Down

0 comments on commit a4c6f71

Please sign in to comment.