Hi, I wrote an Inkscape extension with a widget by myself and would like to make that widget visible on my Inkscape interfaces so that I don't have to navigate to the extension—' my extension'—every time I use it.
Hi Thank you inklinea, I followed all the steps you have shown above, but my extension icon is still not displaying on the inkscape interfaces. I was wondering what might be other factors/setting influence? Thank you.
Hi, I wrote an Inkscape extension with a widget by myself and would like to make that widget visible on my Inkscape interfaces so that I don't have to navigate to the extension—' my extension'—every time I use it.
Does anyone know how to do it? Thank you.
Find your Inkscape system toolbar .ui files these should located at:
( Example is for the Zoom Toolbar )
On Windows:
c:/Program Files/Inkscape/share/inkscape/ui/toolbar-zoom.ui
Ubuntu:
/usr/share/inkscape/ui/toolbar-zoom.ui
Go to Edit>Preferences>System>User ui and left click open.
Copy one of the toolbar .ui files from the folder above to this user ui folder
Open the pasted .ui file in a text editor
Go to Edit>Preferences>Keyboard and search for the name of your extension
You will need to resize the width of the preferences window so you can see the 'ID' of your extension in the ID column.
You can choose the .noprefs id if you want the extension to run with last settings ( without the dialogue popping up )
In the .ui file that you have opened.
Find the last <child>......</child> section and copy and paste a new child section below the </child>
You should have something like this:
<child>
<object class="GtkToolButton">
<property name="visible">True</property>
<property name="action_name">app.org.inkscape.inklinea.spacey</property>
<property name="icon_name">spacey-star</property>
<property name="label" translatable="true">Zoom Next</property>
</object>
</child>
In the <property name="action_name">......</property>
Add the extension ID between the tags
If you want to add a custom icon you can open any existing toolbar icon and edit it in Inkscape
Windows
c:/Program Files/Inkscape/share/inkscape/icons/multicolor/symbolic/actions/zoom-symbolic.svg
Ubuntu
/usr/share/inkscape/icons/multicolor/symbolic/actions/zoom-symbolic.svg
Then save the edited file ( with a new unique filename ) to the folder shown in Edit>Preferences>System>Icons
Edit the <property name="icon_name">spacey-star</property> tag to have your icon filename without the extension.
Restart Inkscape.
I've attached a screenshot of my zoom toolbar with the custom entry added.
Hi Thank you inklinea, I followed all the steps you have shown above, but my extension icon is still not displaying on the inkscape interfaces. I was wondering what might be other factors/setting influence? Thank you.
No worries, I figured it out. Thank you! Very helpful