Make the Vector tool options UI nicer
ClosedPublic

Authored by scottpetrovic on May 11 2017, 11:32 AM.

Details

Reviewers
dkazakov
rempt
Group Reviewers
Krita: Abyss
Summary

This is mostly a usability update on the new vector tool options. The big thing is that the stacked widgets component is not very flexible, so it was creating issues with dead space and making scrollbars where they didn't need to be. In other areas. I have been using vertical layouts and showing/hiding items for these "tab" style widgets like the free transform.

I have been working in a petrovic/vector-ux branch, so you can see more bite size changes withat that.

Test Plan

tested in Ubuntu 16.10 and Windows 8.1

  1. Made a new document and vector layer.
  2. Made a rectangle
  3. Played around with the tool options to see about spacing, flexibleness, and consistency

The only thing that is a little off is the pattern area, but that isn't implemented yet, so it should be an issue once UI elements are added to that.

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
scottpetrovic created this revision.May 11 2017, 11:32 AM
dkazakov edited edge metadata.May 11 2017, 12:18 PM

Hi, @scottpetrovic!

Apart from a minor style fix I proposed inline, there is a subtle layouting bug happening when switching between the fill modes. It looks like now there is some intermediate state with the buttons squeezed :(

Here is the full video:

Screenshot of that intermediate state (taken from the video, it happens quite quickly):

libs/ui/widgets/KoStrokeConfigWidget.cpp
438

Aaaaaa... duplications! I've just cleaned all them up :D

Please refactor it into something like:

const bool lineOptionsVisible = strokeTypeIndex > 0;

d->lineWidth->setVisible(lineOptionsVisible);
d->capNJoinButton->setVisible(lineOptionsVisible);
d->lineStyle->setVisible(lineOptionsVisible);
d->startMarkerSelector->setVisible(lineOptionsVisible);
d->midMarkerSelector->setVisible(lineOptionsVisible);
d->endMarkerSelector->setVisible(lineOptionsVisible);
thicknessLabel->setVisible(lineOptionsVisible);
strokeStyleLabel->setVisible(lineOptionsVisible);
scottpetrovic updated this revision to Diff 14655.EditedMay 18 2017, 3:07 AM

I think I fixed the flickering that happened when changing between the fill types on the stroke options. it took a while to figure out what was going on. I converted the area to a UI file as I was troubleshooting it. I did a few other minor style tweaks along the way.

I pushed all changes to my petrovic/vector-ux branch if that is easier to test.

rempt added inline comments.May 18 2017, 8:45 AM
plugins/tools/selectiontools/kis_tool_select_contiguous.cc
186 ↗(On Diff #14655)

This definitely is wrong -- we changed the range from 1 to 100 quite recently, in c3aa636d1c99a2fa684646769d65368dba3ad780

dkazakov accepted this revision.May 18 2017, 9:28 AM

The patch seems to work fine. Codewise it also looks good except of that trouble in kis_tool_select_contiguous.cc (which most probably is caused by a diff made against wrong version of master :) )

To avoid the problem, please *merge your branch* into master and don't use arc land, because the latter one may squash this accidental change into master. In the merge just add Differential revision: https://phabricator.kde.org/D5809 line to close this revision :)

plugins/tools/selectiontools/kis_tool_select_contiguous.cc
188 ↗(On Diff #14655)

This this as well. I guess it is just 'git diff' problem

This revision is now accepted and ready to land.May 18 2017, 9:28 AM

I apologize for the git sync issue. I just pulled latest for master and it merged into my branch without any conflicts. This is the result. I see it was accepted. Let me know if it is ok to merge.

dkazakov accepted this revision.May 19 2017, 6:44 AM

Yes, it is perfect now, please merge! :)

thanks for the reviews guys! pushed to master