| Server IP : 93.86.61.54 / Your IP : 216.73.216.60 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/inkscape/extensions/__pycache__/ |
Upload File : |
o
5�a� � @ s8 d Z ddlZG dd� dej�Zedkre� �� dS dS )z4
Merges styles into class based styles and removes.
� Nc @ s e Zd ZdZdd� Zdd� ZdS )�MergeStylesz+Merge any styles which are the same for CSSc C s | j jddtddd� d S )Nz-nz--name�namez'Name of selected element's common class)�type�dest�help)�
arg_parser�add_argument�str)�self�pars� r �./usr/share/inkscape/extensions/merge_styles.py�
add_arguments s
�zMergeStyles.add_argumentsc C s� | j j}|s| j�d�}| jj�� }d}|D ]}t|j�� �}|dur(||M }q|}q|s2t �
d�S | jj�d| t �
t|��� |D ]}| jt|��� 8 _|j�|� qCdS )zApply the style effect�cssNz2There are no common styles between these elements.�.T)�optionsr �svg�
get_unique_id�selected�values�set�style�items�inkex�errormsg�
stylesheet�add�Style�sorted�dict�keys�classes�append)r
�newclass�elements�common�elemr r r r
�effect s"