Icons resize incorrectly for custom toolbar items

I’m setting up LibreOffice Writer, and I’ve found some strange behavior when trying to add an icon for a macro I’ve placed on the toolbar. This may be a bug, but I’m hoping there’s a solution, or at least a work-around.

I’m working version 5.0.3.2 (build ID e5f16313668ac592c1bfb310f4390624e3dbfb75) on an iMac (OS X 10.11.1) with a high-DPI (“Retina”) display. The ultimate user (my grandmother) has limited vision, and the icon size is set to large (under Preferences > View > Icon size and style). In case this is relevant, the OS is also set to use a scaled resolution for the display, which it says “looks like 1600 x 900.”

I’ve written a macro that I’m trying to add to the toolbar with an icon (of a printer), which is where I have run into a number of problems.

With the default (“Breeze”) icons, the version in the Change Icon window is correct, but both the Customize window and the toolbar itself use the small-size version. This persists after quitting and re-launching LibreOffice.

With the “Galaxy” and “Oxygen” icons, I get a different problem: they initially work correctly, but when I quit and re-launch LibreOffice, they are scaled so that only part of the icon is visible:

That second problem also happened when I tried to manually import the lc_print.png files in the “Change Icon” window: success initially, but badly re-sized after quitting and relaunching.

Does anyone have an idea of what is going wrong or how I could avoid it? The supplied icon sets resize correctly, so it would seem like there should be a way to configure LibreOffice to treat my macro as it would the standard “print” function — but I can’t figure out how.

Hi

I have not tried and the only thing I know is that imported icons must respect these limitations. I hope this will help you.

Regards

Thanks. The ones I’ve tried have all been either 16x16 or 26x26 px: mostly I’ve been trying to use the standard “print” icon from a given icon set. It’s setting the icon size to “large” (under Preferences > View > Icon size and style) that seems to lead to the problem.

I’m having similar problems, on Xubuntu systems rather than Windows, and mine are inconsistent from one system to another locally. I’ll follow this thread in case you find a solution first!

I’ve tried both 15x16 and 26x26, at both 300 DPI and at 72 DPI. Nothing changes.

I found at least a partial solution to both of my problems not long after posting my comment. With the 16x16 images imported and assigned to the toolbar, I then went to the Options->View dialog and changed the setting for Toolbar Icons from “Automatic” to “small.” Success! both the no-icon-at-all situation and the partial-icon display vanished and all appears as I wanted it to be.

I’ve not tried going back to 26x26 images, or setting the option to “large” or “extra large” because I believe strongly in NOT fixing what ain’t broke – but I believe this result indicates that the problem lies somewhere in the automatic-scaling code for toolbar icons.

Hope this helps someone else!