Skip to content
This repository has been archived by the owner on Jul 6, 2024. It is now read-only.

Commit

Permalink
fix: widthとheightの取得処理の修正
Browse files Browse the repository at this point in the history
  • Loading branch information
PigeonsHouse committed Dec 29, 2023
1 parent 68399ac commit cb88da1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/style/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,11 +448,19 @@ def __repr__(self) -> str:

def get_size_with_padding(self) -> tuple[GraphicValue, GraphicValue]:
width = (
self.source_width if self.source_width is not None else self.width
self.source_width
if (
self.width.unit == GraphicUnit.AUTO
and self.source_width is not None
)
else self.width
)
height = (
self.source_height
if self.source_height is not None
if (
self.height.unit == GraphicUnit.AUTO
and self.source_height is not None
)
else self.height
)
width_with_padding = width + self.padding_left + self.padding_right
Expand Down

0 comments on commit cb88da1

Please sign in to comment.