LibreOffice Extension: How to Bundle Icon Themes
Making LibreOffice more flexible is one of our primary goals announced with the MUFFIN concept. Extensions are a great way for personalization and just like we did for color palettes, we’ve now made icon themes available as extensions. This blog post describes how to create and share your own icon theme extension.
As an example, we are resurrecting the Oxygen icon theme that was removed in the 5.4 release because it was incomplete, missing a maintainer, and themed for KDE 4, which is no longer shipped by Linux distributions. However, the icon theme has many loyal friends using workarounds to bring it back. Here is the correct way to do it.
1. Collect the icons
LibreOffice has a clear structure of icons. For example, internal commands like .uno:Save load icons from the cmd/ folder found in an icon theme’s zip file. The folder using the name scheme sc_* for small 16x16px images, lc_* for 24x24px default images, and 32/* for 32x32px large images which are used in the menus and toolbars. Other icons that are used in dialogs, sidebar, etc. are found in different folders within the icon theme’s zip file. If an icon is not found in the theme, the icon from the fallback theme will be used.
2. Create the extension
An extension has a defined structure and requires particular files to make it function. The icon theme zip file is placed in the folder iconsets (you can share many icon themes in one extension, for example to support bright and dark system themes). You need a folder META-INF with a file manifest.xml that points to the actual config.xcu at the root. In this file you tell the extension manager where to place the content (has to be at %origin%/iconsets).
So far you can just use the example. But the file description.xml should receive more attention.
- identifier value: Extensions are identified by this value. Enter a unique string here.
- version: The first iteration starts usually with 1.
- display-name: This string will be shown in the extension manager
- dependencies: The feature to load icon sets from an extension requires Libreoffice 6.0 or higher.
- publisher: Enter your name and a reference here, if wanted
- icon: This icon will be shown in the extension manager
- extension-description: The description is shown underneath the extension name
<?xml version='1.0' encoding='UTF-8'?> <description xmlns="http://openoffice.org/extensions/description/2006" xmlns:dep="http://openoffice.org/extensions/description/2006" xmlns:lo="http://libreoffice.org/extensions/description/2011" xmlns:xlink="http://www.w3.org/1999/xlink"> <identifier value="org.iconset.Oxygen"/> <version value="1.0.0"/> <display-name name="Oxygen Icon Set"/> <dependencies> <lo:LibreOffice-minimal-version d:name="LibreOffice 6.0" value="6.0"/> </dependencies> <publisher> <name xlink:href="https://wiki.documentfoundation.org/Design">The LibreOffice Design Team</name> </publisher> <icon> <default xlink:href="icons/Oxygen-Theme.png"/> </icon> <extension-description> <src xlink:href="pkg-desc/pkg-description.txt" /> </extension-description> </description>
Finally, you pack everything into a zip file (make sure that config.xcu and description.xml are on the root level and folders are intact) and rename it into Oxygen-IconSet.oxt.
3. Publish your extension
Now everything is ready to share your extension. You can do it where ever you like, but we recommend to use our Extensions website, so it can reach all users of LibreOffice. Register at on the website, if you haven’t already, and follow the easy steps provided. Once you are done, make noise and let the community know about your contribution.
Many thanks to Caolán McNamara for implementing this awesome feature. Unfortunately the extension site is not ready for version 6.0. Meanwhile, if you run an alpha, beta or nightly build, please download the extension here.
Hi,
If at all possible, I would like to have a ribbon interface option for writer.
The ribbon interface has an advantage in that there is more information that can be placed there on, and that drilling down for some LO functions would be as easy and with quicker access.
If such an interface is in development, may I be a alpha/beta tester.
Completely different topic. Ribbon is a UI element used and protected by Microsoft. LibreOffice will not go this way. But we have a similar though more flexible approach with the Notebookbar. There are some postings on this blog about the concept, how to use it, and how to create own layouts.
If you are planning to add something similar to MS Office ribbons, please make it optional (or very flexible, to the point where it can be ignored).
I know it is a matter of taste, but I really dislike ribbons. Ribbons were the sole reason I resisted for years to update my MS Office until I couldn’t avoid anymore. I see no reason to separate functions by completely arbitrary tabs instead of having all frequently used tools very accessible and easily rearranged in toolbars that I can place wherever I want. Not to mention the difference in screen space!
I agree, liking ribbons or hating them is totally a personal preference, a matter of taste. I have heard similar feedback from many other users. If ribbons come in or anything similar then they should be optional. Otherwise many users won’t upgrade anymore.
Thank you for sharing this. I’ve been hoping for interface/icon plugins since the Muffin announcement.
Could you perhaps also link to the LO icon specifications list, so if people come by that do want to design/complete icon themes they know which icons need to be made at which size?
And what are the xmlns= lines supposed to do? Both the LO as OO links give a 404/not found error.
You find the inbuilt themes at your local installation under /share/config/images_*.zip. The xmlns keyword (XML name space) is relevant for identifying the extension correctly (though I never tried to omit). Learn more about extensions at https://wiki.openoffice.org/wiki/Documentation/DevGuide/Extensions/Description_of_XML_Elements
Is there any tool to help creating an icon theme ?
Zip theme files don’t say which icon goes where.
A tool to help identifying icons through LO interface, to test icons sets, or a wiki that enumerates icons name and location in the UI, a full spec list, … would be great.
Thanks.