Method A
-
Create your icons as png files. You need at least a 24x24 pixels version and 16x16 pixels version. You might want to design a 32x32 pixels icon as well. Store these icons e.g. in your user profile folder.
-
Go to Tools > Options > LibreOffice > View and select Small
for Icon Size
field Toolbar
.
-
Go to Tools > Customize. Select the changed toolbar and go to item 150%
. Open the drop-down Modify
and select item Change Icon
.
-
In that dialog click on Import
and select your created 16x16 pixel icon. Then find your icon in the icon list and select it. It is likely at first or last position. OK.
Repeat steps 2 to 4 for icon size Large
with 24x24 pixel icon and for icon size Extra Large
and 32x32 pixel icon.
After setting the icons, you can go to Tools > Options > LibreOffice > View and set the icon size back to Automatic
.
For Method A the icons must be in png file format.
Method B
-
Copy the zip-file of your favorite icon-theme, e.g. images_colibre.zip
, and save it in the same folder with a new name, e.g. images_colibre_expanded.zip
. The new name must not have any blanks or special characters besides the underscore. You find the icon-themes zip-files in <installation-folder>/share/config
.
-
Create your new icons. The file format must be the same as those in the copied icon-theme. Name the icon sc_zoom150percent.png
for the Small
icon size. For Large
icon size use lc_zoom150percent.png
and for Extra Large
use zoom150percent.png
(or .svg respectively). In general, the name must correspond to the uno command, which is .uno:Zoom150percent
in your case.
-
Open the zip-file with e.g. 7-Zip and therein subfolder cmd
. With modern packing tools you need not unpack the zip file, opening is sufficient.
-
Drag the sc_zoom150percent.png
and the lc_zoom150percent.png
into the cmd
folder and the zoom150percent.png
into the cmd/32
folder. Of cause, for a svg icon-theme use svg icons.
-
Close 7-Zip or your packing tool, respectively.
Now we need to tell LibreOffice, that it has to use the icons:
-
Make a backup of file <installation-folder>/share/registry/main.xcd
.
-
Open the file share/registry/main.xcd
in an editor. I use Notepad++ for such edits.
-
Search for “.uno:zoom150percent”. You should see
<node oor:name=".uno:Zoom150Percent" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">150%</value>
</prop>
</node>
Change it to
<node oor:name=".uno:Zoom150Percent" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">150%</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
</prop>
</node>
You can copy&paste the new part from the node “.uno:Zoom100Percent”.
-
Save the file and close editor.
And finally:
Start LibreOffice, go to Tools > Options > LibreOffice > View and select your icon-theme.
In contrast to method A, method B can handle icons not only in png format but in svg format as well.