Spaces:
Runtime error
Runtime error
Disable icon shape's shadow and lower its position
Browse files27 unmodified lines28293031323334465 unmodified lines5005015025025035045055061 unmodified line5085095105105115125135147 unmodified lines52252352452552652752827 unmodified lines
# English Metric Unit (used by PowerPoint) to inchesEMU_TO_INCH_SCALING_FACTOR = 1.0 / 914400INCHES_3 = pptx.util.Inches(3)INCHES_2 = pptx.util.Inches(2)INCHES_1_5 = pptx.util.Inches(1.5)INCHES_1 = pptx.util.Inches(1)465 unmodified lines match = ICONS_REGEX.search(item)
if not match: print('No icon/text pattern match found...skipping to the next item') # print('No icon/text pattern match found...skipping to the next item') continue
icon_name = match.group(1)1 unmodified line icon_path = f'{GlobalConfig.ICONS_DIR}/{icon_name}.png'
left = spacing + idx * (ICON_SIZE + spacing) top = pptx.util.Inches(2) # Adjust the vertical position as needed top = INCHES_3
# Calculate the center position for alignment center = left + ICON_SIZE / 27 unmodified lines INCHES_1, INCHES_1 ) shape.fill.solid() shape.shadow.inherit = False
# Set the icon's background shape color color = random.choice(ICON_COLORS)helpers/pptx_helper.py+4-2