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

Authored by amedonosova on Nov 24 2018, 1:26 PM.

Details

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

BUG: 372169

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
amedonosova created this revision.Nov 24 2018, 1:26 PM
Restricted Application added a reviewer: Krita. · View Herald TranscriptNov 24 2018, 1:26 PM
Restricted Application added a project: Krita. · View Herald Transcript
amedonosova requested review of this revision.Nov 24 2018, 1:26 PM
  • add license to new files
rempt added a subscriber: rempt.Nov 27 2018, 12:38 PM

Um... I think there's still something that doesn't work. If I click on the dial button it suddenly moves to the other side of the dial, and it also feels like the dial is moving in the opposite direction from the mouse.

  • KisLayerStyleAngleSelector: change QDial's min/max values

I fixed a bug that caused the dial to skip the quadrant (90°,180°). That could have caused the moves to other side of the widget.

As for the other problem, to me (on ubuntu 18.10, in Gnome) it seems the cicle on the dial follows the mouse pointer quite normally: Could you please add more detailed description or some images/a video?

rempt added a comment.Dec 4 2018, 10:40 AM

Hi,

Sorry for the delay. I forgot that I had started a build with your patch and went on to do other stuff. The dial still is weird: when I click on the thumb it moves a quarter circle. See the attached screencast.

Hi,

Thanks for testing.

I have reproduced the issues you describe. They happen only if QT is set up to use Breeze theme. I will look into it.

amedonosova updated this revision to Diff 47215.Dec 9 2018, 8:22 PM
  • KisLayerStyleAngleSelector: make the dial work in KDE's Breeze theme

I briefly looked into KDE's Breeze theme, it seems to do something to the QDial while painting the widget (it's not necessarily wrong, but it yields different results to the fusion theme under some circumstances). To work around that, I changed the min/max value of the dial and, subsequently, the conversion between the values of the dial and the spinbox. I tested with both Breeze and Fusion Qt themes, under Gnome, and it seems to work fine now.

rempt accepted this revision.Dec 11 2018, 9:03 AM

Yes, this works :-)

This revision is now accepted and ready to land.Dec 11 2018, 9:03 AM
This revision was automatically updated to reflect the committed changes.