Bug 427556 - ShadowedRectangle is not pixel aligned with software rendering
Summary: ShadowedRectangle is not pixel aligned with software rendering
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: Master
Platform: Other Linux
: NOR normal
Target Milestone: Not decided
Assignee: Arjen Hiemstra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-11 20:00 UTC by Noah Davis
Modified: 2020-11-10 17:51 UTC (History)
0 users

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


Attachments
Above: ShadowedRectangle with 1px thick border. Below: Qt Quick Rectangle with 1px thick border (1.58 KB, image/png)
2020-10-11 20:00 UTC, Noah Davis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Noah Davis 2020-10-11 20:00:44 UTC
Created attachment 132285 [details]
Above: ShadowedRectangle with 1px thick border. Below: Qt Quick Rectangle with 1px thick border

SUMMARY


STEPS TO REPRODUCE
1. run a program that uses ShadowedRectangle with `QMLSCENE_DEVICE=softwarecontext`

OBSERVED RESULT

- Corners are pixellated
- sides are faint
- bottom and right side are 2px thick


EXPECTED RESULT

- corners and sides should have the same smoothness, thickness and position as Qt Quick Rectangle

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20201007
KDE Plasma Version: 5.20.80
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1
Kernel Version: 5.8.4-1-default
OS Type: 64-bit
Processors: 4 × Intel® Core™ i7-6500U CPU @ 2.50GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 520
Comment 1 Arjen Hiemstra 2020-11-10 17:51:38 UTC
Git commit ec10bca7db2a53001fead8ab1302455da06ef985 by Arjen Hiemstra.
Committed on 10/11/2020 at 13:49.
Pushed by ahiemstra into branch 'master'.

Fix rendering borders the proper size with software fallback

Apparently using qpainter strokes results in unpredictable behaviour so
do the same thing we do in the shaders and first render a rectangle at
full size with border color, then a smaller one with fill color.

M  +12   -6    src/scenegraph/paintedrectangleitem.cpp

https://invent.kde.org/frameworks/kirigami/commit/ec10bca7db2a53001fead8ab1302455da06ef985