Ask Your Question

Is it possible to customize the icon of an extension on the toolbar? [closed]

asked 2013-06-06 10:37:08 +0200

David gravatar image

updated 2020-11-27 16:19:40 +0200

Alex Kemp gravatar image

Recently I installed one of the "flat icon" sets for LibreOffice which suits my tastes nicely. I also use the Alternative dialog Find & Replace extension and have its icon on my toolbar:

toolbar image

It makes an uneasy partner (shall we say!) in this context. I have tried to find out how to change the icon of an extension, but the "Alternative Searching" toolbar does not show up in the Tools > Customise... menu, nor does the Tools > Extension Manager... give access to this kind of modification.

I have seen a previous answer to a question about the location of toolbar icons, but this seems not to cover extensions.

Any help out there? I live in hope!

UPDATE: Result after help (see accepted answer, plus comments, below):

toolbar image

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-11-02 03:01:21.765868

1 Answer

Sort by » oldest newest most voted

answered 2013-06-06 12:30:15 +0200

oweng gravatar image

updated 2013-06-07 02:39:29 +0200

The downloadable OXT is essentially a ZIP file. Before you install the extension you can open it and replace these icons in the AltSearch/ directory:

  • altsearch_16.bmp
  • altsearch_26.bmp
  • altsearchz_16.bmp
  • altsearchz_26.bmp

Perhaps use /sfx2/imglst/actionaction012.png or /cmd/lc_searchdialog.png from the flat icon set. They will need to be rescaled (for the _16 versions) and saved as BMP using "magic pink" for transparency.

edit flag offensive delete link more


Thanks - will follow up as able and report back. BMPs are a right pain, aren't they. :/

David gravatar imageDavid ( 2013-06-06 16:58:12 +0200 )edit

It worked. :) Actually, though it's *_26.bmp, not *_24.bmp. I'm not quite sure how one gets the "transparent" bg with a BMP, but I just went with #ccc, and it's close enough. Better than the green, anyway! Is this better?

David gravatar imageDavid ( 2013-06-06 23:03:58 +0200 )edit

The way to fake transparency in a BMP is to set pixels to RGB 255,0,255 or HTML #FF00FF also known as "Magic Pink" :)

Pedro gravatar imagePedro ( 2013-06-07 02:37:30 +0200 )edit

@Pedro beat me to it. I wish the extension in question would just drop the old Windows icon technology and use PNGs. @David, I updated my answer to correct the BMP names. Thanks for that.

oweng gravatar imageoweng ( 2013-06-07 02:41:20 +0200 )edit

Thanks @Pedro & @oweng - did I mention BMPs are a pain? ;) Getting rid of the "halo" was getting irksome, so I called it a day. Improved yet further, but there would be two advantages to extension author updating icons to PNG: (1) would be better!, and (2) he would lose the red "Warning" about no new update in a year from the download site. Thanks again for help with this trivial matter - appreciated!

David gravatar imageDavid ( 2013-06-07 09:27:42 +0200 )edit

@oweng - Btw - I used the "search" icon from the SVG set (rather than PNG) as suggested in your original reply. Rescaling the PNG made for a fuzzy icon, but could set SVG to proper size in Inkscape, export, and keep things crisp. FWIW!

David gravatar imageDavid ( 2013-06-07 09:31:42 +0200 )edit

Great! Thanks a lot! I preferred editing the icons directly in place (e.g. somewhere under ".../libreoffice/4/user/uno_packages/cache/uno_packages/....tmp_" and simply converted the original icons to BW and added "Magic Pink" background. Although I still have a few color icons in the new Sifr icon style (e.g. Save As, optimum column width, insert/delete column/icon, etc.) which look a bit out of place among the rest of the icons.

Sadi gravatar imageSadi ( 2014-05-10 16:01:24 +0200 )edit

Question Tools

1 follower


Asked: 2013-06-06 10:37:08 +0200

Seen: 1,038 times

Last updated: Jun 07 '13