Bug 381784 - Improve foreground and background color behavior in vector objects.
Summary: Improve foreground and background color behavior in vector objects.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layers/Vector (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-29 07:39 UTC by Raghavendra kamath
Modified: 2019-09-21 12:09 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raghavendra kamath 2017-06-29 07:39:33 UTC
Currently When you select a vector shape, and change the foreground color in the toolbar, it changes the fill color of the vector shape, And consequently when you change color through the palette docker it changes its fill color too. Similarly if you change the background color it changes its stroke color. This functionality is nice. it is nice to associate foreground to fill color and background to stroke color when user selects an vector object.

However if you have an vector object selected it's stroke and color don't show-up in the toolbar.

Also the restore to default foreground and background color shortcuts don't work
when user is on a vector layer.

The swap foreground and background color is also a important feature. But the shortcut to do so, also doesn't work when user is in vector layer.


I request to improve the foreground and background color functionality in vector layer as below:

1) Change the foreground and background color in the toolbar according to the fill and background color of the vector shape selected.

2)Add ability to restore to default colors (i.e. black & white) with shortcut in vector layer, which in-turn will change the fill and stroke of the vector object to black and white.

3) Add ability to swap foreground and background color in vector layer, which will in-turn allow user to swap fill and stroke color like in inkscape.
Comment 1 Halla Rempt 2017-11-26 14:38:02 UTC
Added to https://phabricator.kde.org/T6369
Comment 2 wolthera 2018-02-23 18:00:11 UTC
I am adding dmitry to this, but he's already fixed a bunch of color related bugs. Raghukamath, could you check which ones are still relevant on master?
Comment 3 Raghavendra kamath 2018-04-14 04:58:18 UTC
Hi Wolthera,

I checked on the latest master and all three of them are reproducible.
Comment 4 Dmitry Kazakov 2019-09-17 12:21:48 UTC
Git commit 1fdb15d0dae77917b20c61033345fa6124499b35 by Dmitry Kazakov.
Committed on 17/09/2019 at 11:15.
Pushed by dkazakov into branch 'kazakov/vector-color-fix-381784'.

Fix color of the shape being synched with the color selectors

1) When the shape is selected, its color now loaded into the color selector
2) If the shape was deselected without editing the color, then
   old color (before selection) is recovered back
3) If the shape is deselected after its color was modified in any way,
   then the newly selected color is kept in the selector.

M  +36   -0    libs/ui/widgets/KoFillConfigWidget.cpp
M  +2    -0    libs/ui/widgets/KoFillConfigWidget.h

https://invent.kde.org/kde/krita/commit/1fdb15d0dae77917b20c61033345fa6124499b35
Comment 6 Dmitry Kazakov 2019-09-21 12:09:08 UTC
Git commit 32285d7da2fa1f45ed5c15a42aba8289d5743261 by Dmitry Kazakov.
Committed on 21/09/2019 at 10:08.
Pushed by dkazakov into branch 'krita/4.2'.

Fix color of the shape being synched with the color selectors

1) When the shape is selected, its color now loaded into the color selector
2) If the shape was deselected without editing the color, then
   old color (before selection) is recovered back
3) If the shape is deselected after its color was modified in any way,
   then the newly selected color is kept in the selector.

M  +36   -0    libs/ui/widgets/KoFillConfigWidget.cpp
M  +2    -0    libs/ui/widgets/KoFillConfigWidget.h

https://invent.kde.org/kde/krita/commit/32285d7da2fa1f45ed5c15a42aba8289d5743261