Skip to content

Commit

Permalink
πŸ› Fix svg size
Browse files Browse the repository at this point in the history
  • Loading branch information
AnoyiX committed Oct 19, 2022
1 parent 320d4c4 commit 23b354f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

def generate_svg(icon_names, cols, iconBgColor):
svgs = [ICONS[x.lower()] for x in icon_names]
width = min(cols * ICON_SIZE, len(icon_names) * ICON_SIZE) + PADDING - GAP
height = math.ceil(len(icon_names) / cols) * ICON_SIZE + PADDING - GAP
width = (min(cols * ICON_SIZE, len(icon_names) * ICON_SIZE) + PADDING - GAP) * SCALE
height = (math.ceil(len(icon_names) / cols) * ICON_SIZE + PADDING - GAP) * SCALE
icon_bg_rect = f'<rect xmlns="http://www.w3.org/2000/svg" width="256" height="256" rx="56" fill="#{iconBgColor}"/>' if iconBgColor else ''
return f"""
<svg width="{width}" height="{height}" viewBox="0 0 {width} {height}" xmlns="http://www.w3.org/2000/svg" version="1.1">
Expand Down

0 comments on commit 23b354f

Please sign in to comment.