On Wed, 2014-07-09 at 14:52 +0200, Tomasz Boczkowski wrote:
Hi!
I'd like to post a video of a new swatches dialog[1]. It displays color swatches and patterns as preview tiles divided into palettes. The palettes are read from .gpl and .svg files in stock directories. One category "Current document" is special, as it shows paint servers from currently opened document. The dialog allows applying swatches to fill and stroke. It is also possible to create new swatches based on current object solid fill or stroke. New pattern can be created by invoking "object to pattern" command from add menu.
How do you like it?
I love it!
I still have some issues to be implemented and I'd like to ask you some questions about it.
- I would like to implement modifying existing patterns. My original
idea was to create new dialog "swatch properties". Now I think using existing "object attributes" and "object properties" dialogs would be simpler and more versatile. After clicking a modify button a popup will appear [2]. Each option would show appropriate dialog.
The ability to modify a swatch color and have all uses of the swatch change is an important feature. One should be able to change the color using RGB, HSL, etc. as in the Fill and Stroke dialog.
It would also have been nice to be able to change multiple swatches at the same time as it might have been if last years color GSOC project had been finished.
The content of the property dialogs is based on current selection, and there is no option to display the properties of arbitrary objects. I have two possibilites:
- set selection to swatch element (having solidColor, gradient or
pattern tag). Selection API allows it, but only visible objects are selected in inkscape so far.
- modify the property dialogs to enable editing arbitrary objects by
adding a setObject(SPObject *) method. Which of the options is favourable?
The first seems more intuitive.
- The dialog should enable removing swatches. I think placing, rather
long, implementation of this feature in swatches dialog class might not be the best solution. Where else can I place the code?
?
- Old swatches dialog supplies an "auto" palette. It consists of
swatch objects from current document that have "obs:swatch" attribute defined. The new one displays all swatches from current document. Should I keep the the palette?
This was probably due to how swatches are implemented. At the moment they are implemented with one-stop gradients so the obs:swatch attribute is probably being used to separate swatches from true gradients. In the future we should be using the new <solidColor> element instead of one-stop gradients. We should also be displaying gradients in the swatches dialog.
The Fill and Stroke dialog could use a rethinking. I really don't like that clicking on the Swatch icon automatically creates a new swatch. What if I just want to choose an already defined swatch? Same thing with clicking on the Pattern icon. It might be interesting to think on how the Fill and Stroke tabs could be integrated with the new Swatches dialog.
Tav