[Solved] Change Toolbar button icon displays weird image

Discuss the word processor
Post Reply
User avatar
BenDev
Posts: 46
Joined: Sat May 18, 2019 3:32 pm

[Solved] Change Toolbar button icon displays weird image

Post by BenDev »

Hello,

I'm trying to simply change the icon of a button on a toolbar.
Even if I choose a pre-existing LibreOffice Icon, when applying the change, the icon is not displayed as it should be...
The issue occurs whatever image I choose.

I've put an image in attachement so you can understand what the problem is.

Note that I'm on LibreOffice 6.1.5.2

Any clue on this ?
Thanks in advance for any help or advice ;)
Attachments
Change_Button_Icon_1.png
Last edited by BenDev on Wed May 22, 2019 5:51 pm, edited 2 times in total.
LibreOffice 6.1.5.2 (x64) and LibreOffice 6.2.4.2 (x64)
Windows 8.1 Pro
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Change Toolbar button icon displays weird image

Post by Zizi64 »

Which icon set are you using?

Can you upload the test.odt file here (with the embedded macro and with the embedded Custom toolbar)?
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
BenDev
Posts: 46
Joined: Sat May 18, 2019 3:32 pm

Re: Change Toolbar button icon displays weird image

Post by BenDev »

To Zizi64:

Well, I'm using the default icon library that is automatically loaded on the interface...So I don't really know if the set has a specific name...

I've attached the file.
But notice that this example has no real content,I've only created the architecture needed to be able to create a button linked on a macro.
Attachments
Test.odt
(10 KiB) Downloaded 93 times
LibreOffice 6.1.5.2 (x64) and LibreOffice 6.2.4.2 (x64)
Windows 8.1 Pro
Bill
Volunteer
Posts: 8932
Joined: Sat Nov 24, 2007 6:48 am

Re: Change Toolbar button icon displays weird image

Post by Bill »

Select Tools > Options > LibreOffice > View. The icon set is the Icon style listed under User Interface.
AOO 4.1.14 on Ubuntu MATE 22.04
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Change Toolbar button icon displays weird image

Post by Zizi64 »

I I know it exactly, the default icon set ids the Colibre in the LO 6.1.5.
(I am using the Galaxy icon set. The newer LO versions not contain the Galaxy icon set by default, it must install as an extension.)

I just tried to set the icon set to Colibre, but I can not find the right arrow-like triangle in the set Colibre.

Maybe you have set this icon in an older version of the LibreOffice for your document, therefore the document may contains the icon, but the default icon set of the new LibreOffice has not.

(The Galaxy icon set, and the Tango icon set have such icon. That labelled as ".uno:RunBasic" icon. And the Tango was the default icon set in the previous versions.)
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
BenDev
Posts: 46
Joined: Sat May 18, 2019 3:32 pm

Re: Change Toolbar button icon displays weird image

Post by BenDev »

Hello,

Thanks for your answers.
So:
Effectively, the Icon set is called "Colibre". It's the default icon set with the LibreOffice Installer as @Zizi64 said I suppose, as I've not changed those parameters by myself.

Note that the problem I'm facing is not specific to the right arrow icon, but it occurs whith any icon I try to set.

The test file has no history, It's a new file created with the LibreOffice version 6.1.5.2. So not set with an older version...
LibreOffice 6.1.5.2 (x64) and LibreOffice 6.2.4.2 (x64)
Windows 8.1 Pro
User avatar
BenDev
Posts: 46
Joined: Sat May 18, 2019 3:32 pm

Re: Change Toolbar button icon displays weird image

Post by BenDev »

I've finally found the origin of the display problem.
In the Menu Options / LibreOffice / View panel, the option "Use openGL for every rendered was checked...
If I uncheck this option, the icon is well displayed (see attached Image).

But this option seems to be checked by default, so I guess that the issue can occur on any computer the file will be used...
Attachments
Option_Use_OpenGL.png
LibreOffice 6.1.5.2 (x64) and LibreOffice 6.2.4.2 (x64)
Windows 8.1 Pro
User avatar
BenDev
Posts: 46
Joined: Sat May 18, 2019 3:32 pm

Re: Change Toolbar button icon displays weird image

Post by BenDev »

As display of specific set icon is working now, I've tried to import a custom icon (not in pre-installed icon set then).
It works well but I notice that the icon is not embedded in the document and "only" linked to the original source paht...So it will not be displayed if the file doesn't exists at the original source path...

Is there any way to embed a custom icon on a toolbar button into the document ?
LibreOffice 6.1.5.2 (x64) and LibreOffice 6.2.4.2 (x64)
Windows 8.1 Pro
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Change Toolbar button icon displays weird image

Post by RoryOF »

You could, perhaps, insert the icon file into the OO archive that is your default template, and link to it there. That will need quite a lot of research on your part to discover the ways and means. I think it might be simpler to get used to the existing icon structure and forget about this.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
BenDev
Posts: 46
Joined: Sat May 18, 2019 3:32 pm

Re: Change Toolbar button icon displays weird image

Post by BenDev »

Hi @RoryOF,
No problems with ways and means, I really like to search and find solutions while learning ;)
I'm now working on a development project on LibreOffice.
But it needs to get things embeded because the final file will be deployed on many computers as a standalone file working by itself.

Your idea would certainly mean to deploy an installer at least to install the icon for it to exist on the target computer.
LibreOffice 6.1.5.2 (x64) and LibreOffice 6.2.4.2 (x64)
Windows 8.1 Pro
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Change Toolbar button icon displays weird image

Post by RoryOF »

If the icon is embedded in the OO template used, that will ensure its presence on any other computer using a file based on that template.

Search for "OpenOffice macro metadata" for some clues on how you might embed extra information in an OO file. The same methods can be used to modify the default template.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
BenDev
Posts: 46
Joined: Sat May 18, 2019 3:32 pm

Re: Change Toolbar button icon displays weird image

Post by BenDev »

Thanks @RoryOF !

Like a docx file, an odt file is a collection of xml files packed as a .zip format.
So I've found the folder where the static button icon is stored and replaced it by my custom icon.

Seems to work.
LibreOffice 6.1.5.2 (x64) and LibreOffice 6.2.4.2 (x64)
Windows 8.1 Pro
Post Reply