Bug 466582 - Vector Shape positions are floats, yet the interface pretends they are integers
Summary: Vector Shape positions are floats, yet the interface pretends they are integers
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Vector (show other bugs)
Version: 5.1.5
Platform: Other All
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: regression
: 390950 416833 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-02-28 04:57 UTC by FrostKiwi
Modified: 2024-01-22 08:13 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description FrostKiwi 2023-02-28 04:57:20 UTC
In previous versions of Krita (hope I'm not imagining this), Vector shape positions were shown as floats, with their .x tenth's place being displayed. This has been removed to only show positions without the .x precision.
There is a problem with doing it that way. When vectors are positioned with the mouse, they get non-integer rounded  float potions, that cause are blurring and shape error artifacts when vectors are rasterized.

The solution to remove these artifacts becomes a strange ritual of having to press [Up Arrow] [Down Arrow] or manually entering an integer to remove these artifacts. This is explained in in at 6:49 in this video: https://www.youtube.com/watch?v=X1Aui6o_V2A&t=409s which is part of a PullRequest of another project. ( https://github.com/Immediate-Mode-UI/Nuklear/pull/548 )

To more clearly communicate to the user what is actually going on, the float decimal place should be displayed, if the the position float is not a round integer.

This issue only concerns itself with the .x position place not being displayed and not the artifacts. That will be a separate issue.

SOFTWARE/OS VERSIONS
Krita 5.1.5
Comment 1 Halla Rempt 2023-03-06 12:02:42 UTC
This changed from Krita 3.x in Krita 4.0, five years ago. The actual spinboxes are still double spinboxes, not integer spinboxes with precisions set to two decimals, so this is pretty weird... I'll confirm the bug, but we've got so much on our plate that I cannot promise a quick solution.
Comment 2 Halla Rempt 2023-03-06 12:17:30 UTC
I'll raise this issue during today's meeting, because I'm not sure how to go on.
Comment 3 wolthera 2023-03-06 14:00:31 UTC
The problem is in KisSpinBoxUnitManager::getApparentUnitRecommandedDecimals() const;

The stroke config widget seems to set decimals in KoStrokeConfigWidget.cpp ln 137, perhaps decimals need to be set at DefaultToolGeometryWidget::setUnit(const KoUnit &unit)?
Comment 4 Halla Rempt 2023-03-06 14:18:00 UTC
I'm still not totally sure about this... Should we really show the size in pixels here? And also, isn't the question perhaps more like, the bounds should snap to the pixel?
Comment 5 wolthera 2023-03-06 14:26:42 UTC
The size is shown in pixels because the spinbox allows you to edit the suffix. When you set it to 'pt' and then the decimals become visible. It's one of the few places in Krita where we do this, but that's also because a drop down with a unit selector would take up too much space. You can fix it to a unit, but there's still the simple usability problem that people don't realize they can type in a different unit which can be converted, and we'll get requests to type in pixels.

Personally I'm very neutral towards UX changes, but I think this is the thought process behind the current situation...
Comment 6 Halla Rempt 2023-03-06 15:20:13 UTC
Git commit 486d154afcd754fd72290e4a7f5262a2ea6a4477 by Halla Rempt.
Committed on 06/03/2023 at 15:19.
Pushed by rempt into branch 'master'.

Show two decimal places in the vector object tool docker

After discussion in the meeting, it was decided that this is fine.

M  +6    -1    plugins/tools/defaulttool/defaulttool/DefaultToolGeometryWidget.cpp

https://invent.kde.org/graphics/krita/commit/486d154afcd754fd72290e4a7f5262a2ea6a4477
Comment 7 Tiar 2024-01-22 08:11:57 UTC
*** Bug 390950 has been marked as a duplicate of this bug. ***
Comment 8 Tiar 2024-01-22 08:13:04 UTC
*** Bug 416833 has been marked as a duplicate of this bug. ***