New swatches dialog and questions
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 still have some issues to be implemented and I'd like to ask you some questions about it.
1) 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 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?
2) 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?
3) 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?
Regards, Tomasz
[1] https://www.dropbox.com/s/80f9r6ct9w2fktx/swatches-dialog.mpeg [2] https://www.dropbox.com/s/hn8cqvu64ke364b/modify_swatch.png
On Wed, 2014-07-09 at 14:52 +0200, Tomasz Boczkowski wrote:
How do you like it?
I like it very much. :-) good work!
- 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?
In symbols I change the selection behavior so selecting symbols is akin to selecting objects on the canvas. I'm still waiting to see if anyone notices or like the features it allows. One is to be able to delete the selection using the delete key (or anything else that affects the selection).
Not sure about swatches, they seem more abstract than symbols.
Best Regards, Martin Owens
There's one more issue that I would like to consult.
4) There's a number of palettes provided with inkscape. If they are all displayed in tree mode, they occupy a lot of space in swatches dialog [1]. It can be quite uncomfortable to use "Ubuntu" and "Current document" palettes at the same time. In grid view mode, when all categories are collapsed into one, the situation is even worse [2].
I can think of three solutions: * Leave tree mode [1] as is and in grid mode [2] display only expanded palettes. To enhance discoverability it would be possible to expand and close palettes from popup menu [3] * Use the popup menu [3] to choose palettes that are shown in swatches dialog. If a category is shown it can further be expanded or collapsed. * Share a TreeModel behind swatches dialog between: patterns panel in fill and stroke dialog, color chooser bar at the bottom of the screen and swatches dialog. Add a dialog to choose active palettes, as shown in [4]. The solution is similar to GIMP behaviour.
Which of them do you like most?
In third case we have a data model common to a number of dialogs. How can I implement creating and sharing the object? What comes to my mind is making the data model a singleton, or associating it with SPDesktop object. Are there other possibilities?
[1] https://www.dropbox.com/s/5tfjj0ih62fxl03/swatches_categories1.png [2] https://www.dropbox.com/s/5675of3vfi926pt/swatches_categories2.png [3] https://www.dropbox.com/s/q16h3ecqhkn1pso/swatches_categories3.png [4] https://www.dropbox.com/s/v245xz3m1o82jch/palettes_dialog.png
On Wed, 2014-07-09 at 18:57 +0200, Tomasz Boczkowski wrote:
There's one more issue that I would like to consult.
- There's a number of palettes provided with inkscape. If they are
all displayed in tree mode, they occupy a lot of space in swatches dialog [1]. It can be quite uncomfortable to use "Ubuntu" and "Current document" palettes at the same time. In grid view mode, when all categories are collapsed into one, the situation is even worse [2].
Yes, this is a big problem.
I can think of three solutions:
- Leave tree mode [1] as is and in grid mode [2] display only expanded
palettes. To enhance discoverability it would be possible to expand and close palettes from popup menu [3]
I like the way the tree mode keeps the palettes separate. I prefer this to the grid mode.
- Use the popup menu [3] to choose palettes that are shown in swatches
dialog. If a category is shown it can further be expanded or collapsed.
There is a discoverablity issue here.
- Share a TreeModel behind swatches dialog between: patterns panel in
fill and stroke dialog, color chooser bar at the bottom of the screen and swatches dialog. Add a dialog to choose active palettes, as shown in [4]. The solution is similar to GIMP behaviour.
Sharing the TreeModel is a good idea, but I am not sure about the dialog to choose the palette.
Which of them do you like most?
What about adding a fourth option "Choose Palettes" to Tree, Grid, List that would be like your Palettes dialog
In third case we have a data model common to a number of dialogs. How can I implement creating and sharing the object? What comes to my mind is making the data model a singleton, or associating it with SPDesktop object. Are there other possibilities?
Singleton would be fine, I think.
Tav
[1] https://www.dropbox.com/s/5tfjj0ih62fxl03/swatches_categories1.png [2] https://www.dropbox.com/s/5675of3vfi926pt/swatches_categories2.png [3] https://www.dropbox.com/s/q16h3ecqhkn1pso/swatches_categories3.png [4] https://www.dropbox.com/s/v245xz3m1o82jch/palettes_dialog.png
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
participants (3)
-
Martin Owens
-
Tavmjong Bah
-
Tomasz Boczkowski