Bug 420286 - ShadowedRectangle is not pixel aligned
Summary: ShadowedRectangle is not pixel aligned
Status: REOPENED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR minor
Target Milestone: Not decided
Assignee: Marco Martin
URL:
Keywords:
: 420404 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-04-19 02:45 UTC by Noah Davis
Modified: 2020-04-22 12:51 UTC (History)
3 users (show)

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


Attachments
top left corner of a ShadowedRectangle with default parameters (745 bytes, image/png)
2020-04-19 02:45 UTC, Noah Davis
Details
red border with a width of 2 (11.15 KB, image/png)
2020-04-19 03:05 UTC, Noah Davis
Details
Kirigami cards after D28625 (19.82 KB, image/png)
2020-04-21 17:26 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-04-19 02:45:06 UTC
Created attachment 127678 [details]
top left corner of a ShadowedRectangle with default parameters

SUMMARY
The sides of ShadowedRectangle are not pixel aligned, but the corners are.

STEPS TO REPRODUCE
1. Create a ShadowedRectangle. Default parameters or any combination of border and shadow parameters will work.

OBSERVED RESULT
Sides are farther inside than the corners

EXPECTED RESULT
Sides should be pixel aligned and aligned with the corners

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20200415
KDE Plasma Version: 5.18.80 (git master)
KDE Frameworks Version: 5.70 (git master)
Qt Version: 5.14.1
Comment 1 Noah Davis 2020-04-19 03:05:11 UTC
Created attachment 127679 [details]
red border with a width of 2

Actually, I'm not exactly sure how to describe it succinctly with words now, but this screenshot should show the issue.
Comment 2 Arjen Hiemstra 2020-04-21 10:08:48 UTC
I have just landed https://phabricator.kde.org/D28625 which contains a fix for a pixel alignment issue I saw with the border. Please try and see if that also fixes your case.
Comment 3 Noah Davis 2020-04-21 17:26:52 UTC
Created attachment 127756 [details]
Kirigami cards after D28625

Unfortunately, it didn't fix the issue. Even if I hardcode the border size in DefaultCardBackground to 1, it still looks the same as the picture I've just attached.
Comment 4 Arjen Hiemstra 2020-04-22 09:13:44 UTC
*** Bug 420404 has been marked as a duplicate of this bug. ***
Comment 5 Arjen Hiemstra 2020-04-22 12:51:56 UTC
I did some further tweaking in https://phabricator.kde.org/D29092 . This still has some slightly haloing around certain edges, which unfortunately is pretty much unavoidable with the rendering techniques involved without sacrificing any antialiasing for the corners.