mirror of
https://github.com/Steffo99/emblematic.git
synced 2024-11-21 22:34:19 +00:00
Properly center icons with dimensions
This commit is contained in:
parent
41a1ca8261
commit
55980863c3
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ def compose_basic(background: bs4.Tag, icon: bs4.Tag, width: int, height: int) -
|
|||
icon.attrs["width"] = "63%"
|
||||
icon.attrs["height"] = "63%"
|
||||
icon.attrs["preserveAspectRatio"] = "xMidYMid meet"
|
||||
icon.attrs["transform"] = f"translate({width * 0.37}, {height * 0.37})"
|
||||
icon.attrs["transform"] = f"translate({width * 0.37 / 2}, {height * 0.37 / 2})"
|
||||
|
||||
doc = bs4.BeautifulSoup(f"""
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {width} {height}">
|
||||
|
|
Loading…
Reference in a new issue