Bug 427556

Summary: ShadowedRectangle is not pixel aligned with software rendering
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Noah Davis <noahadvs>
Component: generalAssignee: Arjen Hiemstra <ahiemstra>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: Master   
Target Milestone: Not decided   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Above: ShadowedRectangle with 1px thick border. Below: Qt Quick Rectangle with 1px thick border

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