Bug 372169 - GUI angular control for Shadow light source shows incorrect angle (spinbox is correct)
Summary: GUI angular control for Shadow light source shows incorrect angle (spinbox is...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: layer styles (show other bugs)
Version: 3.0.1.1
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 384662 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-11-07 08:12 UTC by Kirill Kustov
Modified: 2018-12-11 16:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Not correctly (27.45 KB, image/png)
2016-11-07 08:12 UTC, Kirill Kustov
Details
Circle Point (32.81 KB, image/png)
2016-11-07 09:37 UTC, Kirill Kustov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kirill Kustov 2016-11-07 08:12:32 UTC
Created attachment 102088 [details]
Not correctly

Hello!
I set the angle of the light source -45 in drop shadow (Layer style). See attachment.
Shadow moves to light source. It is not corectly. Shadow should be located in the lower right corner.
The location of the shadow is not correctly in another angles too.
Sorry for my English.
Comment 1 Kirill Kustov 2016-11-07 09:37:26 UTC
Created attachment 102090 [details]
Circle Point

I understood bug.
The angle of the light source, location of the shadows are correctly.
Circle Point is incorrect. See attachement.
Circle Point is must be show angle of the light source.
Comment 2 Kirill Kustov 2016-11-08 02:11:17 UTC
The same problem in Inner Shadow.
Circle point isn't moving correctly too.
The shadow should be located on the opposite side of the circle (object).
Comment 3 Dmitry Kazakov 2016-11-08 09:50:04 UTC
Only GUI control is not correct, the value itself is correct
Comment 4 Victor Wren 2018-01-21 18:03:57 UTC
To clarify, the GUI control corresponds to the angle in the numerical selector box, but neither of them corresponds to the angle of the shadow in the preview  on-screen.  So the number agrees with the GUI spinner control (i.e. 0 is vertical, 90 is to the right, 180 is at the bottom and -90 is to the left), but the controls don't agree with what is actually on the layer.

i.e. "0" puts the spinner dot at the top, the light source at the right, the shadow at the left

"90" puts the spinner at the right, the light source at the top, the shadow at the bottom,

"180" puts the spinner at the bottom, the light source at the left, the shadow to the right,

"-90" puts the spinner at the left, the light source at the bottom, the shadow at the top.

As the number increases, suggesting a clockwise rotation of the light source, the spinner moves clockwise as expected, but the apparent light source on the preview rotates counter-clockwise.

This is probably a simple subtraction error somewhere.
Comment 5 mvowada 2018-01-21 21:26:46 UTC
*** Bug 384662 has been marked as a duplicate of this bug. ***
Comment 6 Anna Medonosova 2018-12-11 16:48:41 UTC
Git commit c099ae3e614d1686ac164316a793ea1a2a8ba225 by Anna Medonosova.
Committed on 11/12/2018 at 16:48.
Pushed by amedonosova into branch 'master'.

Layer Styles UI: fix for angle selection, small UI tweaks

Summary:
1, Fix for Bug 372169 - GUI angular control for Shadow light source shows incorrect angle (spinbox is correct)

Adobe’s angle selection dial widget differs from QDial by 90 degrees. That creates the inconsistency between settings dialogs and layer effects. In this diff, angle selection is moved into dedicated widget, KisLayerStyleAngleSelector, which solves this problem for all layer style settings dialogs. Also lessens code duplication in this area.

2, Label alignment unification with proper use of QFormLayout

Reviewers: #krita, rempt

Reviewed By: #krita, rempt

Subscribers: rempt

Tags: #krita

Differential Revision: https://phabricator.kde.org/D17134

M  +3    -1    libs/ui/CMakeLists.txt
M  +25   -134  libs/ui/dialogs/kis_dlg_layer_style.cpp
M  +0    -24   libs/ui/dialogs/kis_dlg_layer_style.h
M  +38   -40   libs/ui/layerstyles/WdgGradientOverlay.ui
M  +37   -55   libs/ui/layerstyles/WdgSatin.ui
M  +52   -41   libs/ui/layerstyles/WdgStroke.ui
M  +62   -106  libs/ui/layerstyles/wdgBevelAndEmboss.ui
A  +95   -0    libs/ui/layerstyles/wdgKisLayerStyleAngleSelector.ui
M  +67   -103  libs/ui/layerstyles/wdgdropshadow.ui
A  +117  -0    libs/ui/widgets/KisLayerStyleAngleSelector.cpp     [License: LGPL]
A  +68   -0    libs/ui/widgets/KisLayerStyleAngleSelector.h     [License: LGPL]

https://commits.kde.org/krita/c099ae3e614d1686ac164316a793ea1a2a8ba225