What happens when a style is saved?
sturgman opened this issue · comments
Could you explain what happens when a style is saved? Inkscape does not have a "style library" functionality as far as I know. Are you defining the styles in some kind of svg file and importing them somehow? Thank you!
The code responsible for savings styles / objects is located in the styles.py
file.
First, the code copies the object by pressing Ctrl+C:
inkscape-shortcut-manager/styles.py
Line 79 in da65ba2
Then the get(TARGET)
retrieves the content from the clipboard in the format specified by TARGET
, which is a constant equal to 'image/x-inkscape-svg'
. So this retrieves the svg code for the object.
Then the code writes this svg to a file located in the configuration directory (~/.config/inkscape-shortcut-manager/objects/name.svg
or /styles/name.svg
)
inkscape-shortcut-manager/styles.py
Line 105 in da65ba2
When you apply a style, this file gets copied to your clipboard and the program presses Ctrl+Shift+V
, which is 'paste style'.
Hopes this clears things up a bit!