[Libreoffice] [PATCH] new color picker dialog for all applications

Christian Lippka cl at lippka.com
Thu May 5 13:18:53 PDT 2011


This is a patch I have hacked on in my spare time.

It replaces the old color picker with a new one. See here for a video
demo

http://youtu.be/rPu6EmIxkIM?hd=1

To see it in the running office you can for example go to menu
tools->options->colors and press edit

The dialog is implemented as a service so it is usable from
extensions.

here is the patch

http://dl.dropbox.com/u/10629960/patch.txt

The patch is against an OOo DEV300 m102, so there may be conflicts.
There is one binary included in the patch, which looks like a git
patch can handle. If not, here is the image

http://dl.dropbox.com/u/10629960/colorslider.png

It should be placed in default_images/res

My changes and new code are MPL 1.1 / GPLv3+ / LGPLv3+ licensed.

To any reviewers. The code in the new dialog may look a bit complicated
at places. There where two difficulties in this feature causing this.
First, the rendering of the color field at the left and the color slider
on the right where a huge performance problem in my first
implementation. So I did some loop unrolling and lookup table stuff to
make it usable.

Second problem are rounding errors when converting between different
color spaces. Therefore the rgb color is saved as doubles and some
care has been taken that the conversion is not jittering.

I'm hanging around on IRC with nick "cl" sometimes if there are merge
conflicts or build trouble on a different platform then windows.

Christian.





More information about the LibreOffice mailing list