Skip to content

Commit

Permalink
Merge pull request #521 from nsty/fix/right_text_align
Browse files Browse the repository at this point in the history
Fix right text align outside of the text box.
  • Loading branch information
werdeil committed Feb 3, 2024
2 parents b5b5846 + ba35f0e commit 7506ef5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pibooth/view/background.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def multiline_text_to_surfaces(text, color, rect, align='center'):
elif align.endswith('center'):
x = rect.centerx - surface.get_rect().width / 2
elif align.endswith('right'):
x = rect.right - surface.get_rect().width / 2
x = rect.right - surface.get_rect().width
else:
raise ValueError("Invalid horizontal alignment '{}'".format(align))

Expand Down

0 comments on commit 7506ef5

Please sign in to comment.