Bug 316985

Summary: Color to Alpha dialog : color selection is not precise.
Product: [Applications] krita Reporter: David REVOY <info>
Component: FiltersAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: normal CC: dimula73
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: actual situation

Description David REVOY 2013-03-18 17:03:29 UTC
Created attachment 78179 [details]
actual situation

When performing a "Color To Alpha" filter, the actual color selector ( a little wheel embeded in the dialog ) is not enough precise to remove the desired color if this one is specific. 

Proposition : Call the default Qt dialog for color selection : it has a color picker ( efficient to select , and more precise options )
Comment 1 Dmitry Kazakov 2013-03-21 16:33:28 UTC
Git commit f1b0f0fed1f3c71479820406f7aac55c08694c08 by Dmitry Kazakov.
Committed on 21/03/2013 at 17:14.
Pushed by dkazakov into branch 'krita-testing-kazakov'.

Made the interface of the Color To Alpha filter more friendly

1) Added a slider to the 'Threshold' parameter
2) Added a KColorButton button for choosing a color
3) Fixed application of the filter with "Enter" key

M  +15   -2    krita/plugins/filters/colors/kis_wdg_color_to_alpha.cpp
M  +2    -0    krita/plugins/filters/colors/kis_wdg_color_to_alpha.h
M  +104  -41   krita/plugins/filters/colors/wdgcolortoalphabase.ui
M  +10   -2    krita/ui/forms/wdgfilterdialog.ui

http://commits.kde.org/calligra/f1b0f0fed1f3c71479820406f7aac55c08694c08
Comment 2 Dmitry Kazakov 2013-03-21 16:33:28 UTC
Git commit 851a193fc36e7742951b662590544ff1c6f5c539 by Dmitry Kazakov.
Committed on 21/03/2013 at 17:14.
Pushed by dkazakov into branch 'krita-testing-kazakov'.

Added an ability to pick colors from the Color To Alpha filter

This patch makes several quite significant changes:
1) KisToolPickColor now saves (!) its configuration to the disk! So you'll
   have your options loaded on the next run of Krita
2) KisToolPickColor now has two sets of settings: for temporary activation
   (the one used in filters) and for usual activation. They both are
   load/save'able.
3) The KoToolManager's methods for temporary switching of the tool are now
   made public. I guess, they were made private initially, because there was
   no usecase for it those days.

So the interaction with the color2alpha filter is the following:

1) You open a filter
2) The filter activates the picker tool
3) You can pick colors and change options of the tool: these changes will
   not affect your normal settings
4) When you press Ok/Cancel the original tool is reactivated

Known bugs:
Color Picking doesn't work with Adj. Layers and Filter Masks :(

M  +22   -1    krita/plugins/filters/colors/kis_wdg_color_to_alpha.cpp
M  +10   -0    krita/plugins/filters/colors/kis_wdg_color_to_alpha.h
M  +119  -36   krita/plugins/tools/defaulttools/kis_tool_colorpicker.cc
M  +25   -6    krita/plugins/tools/defaulttools/kis_tool_colorpicker.h
M  +18   -18   libs/flake/KoToolManager.cpp
M  +15   -2    libs/flake/KoToolManager.h
M  +0    -1    libs/widgets/KoTriangleColorSelector.cpp

http://commits.kde.org/calligra/851a193fc36e7742951b662590544ff1c6f5c539