Bug 365053 - Icon overlay discards origin
Summary: Icon overlay discards origin
Status: CONFIRMED
Alias: None
Product: frameworks-kguiaddons
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: gandolfi rafael
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-03 23:30 UTC by gandolfi rafael
Modified: 2022-10-22 18:18 UTC (History)
1 user (show)

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


Attachments
correct overlay drawing position (1013 bytes, patch)
2016-07-03 23:32 UTC, gandolfi rafael
Details
Self-contained test cases to illustrate the bug and the proposed patch. (47.85 KB, application/gzip)
2016-07-21 00:03 UTC, gandolfi rafael
Details
Screenshot of KIconUtils::addOverlay with and without the patch (86.63 KB, image/png)
2016-07-25 22:38 UTC, gandolfi rafael
Details
Self-contained test cases to illustrate the bug and the proposed patch updated with current kguiaddons (95.47 KB, application/gzip)
2022-10-22 18:18 UTC, gandolfi rafael
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gandolfi rafael 2016-07-03 23:30:38 UTC
The origin is discarded in KOverlayIconEngine::paint which result in badly placed overlay, p.e. if you're drawing the icon in a QAbstractItemView.

Reproducible: Always

Steps to Reproduce:
1. Create a simple class derived from QAbstractItemModel
2. In data() for Qt::DecorationRole, overlay the icons with KIconUtils::addOverlay
3. Put the model in a QTreeView

Actual Results:  
The overlay is rendered in non sensical possition when I've managed to spot it.

Expected Results:  
the overlay rendered at the expected position in the base icon.

I'll attached a patch which fixes the issue as I understood it.
Comment 1 gandolfi rafael 2016-07-03 23:32:40 UTC
Created attachment 99840 [details]
correct overlay drawing position
Comment 2 gandolfi rafael 2016-07-21 00:03:56 UTC
Created attachment 100221 [details]
Self-contained test cases to illustrate the bug and the proposed patch.
Comment 3 gandolfi rafael 2016-07-25 22:38:46 UTC
Created attachment 100303 [details]
Screenshot of KIconUtils::addOverlay with and without the patch
Comment 4 Justin Zobel 2022-10-21 23:59:41 UTC
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Comment 5 gandolfi rafael 2022-10-22 18:18:47 UTC
Created attachment 153125 [details]
Self-contained test cases to illustrate the bug and the proposed patch updated with current kguiaddons

The bug is still present with the current kguiaddons. I used the version hosted at https://github.com/KDE/kguiaddons updated 3 days ago.
You can use the updated test case attached to confirm it by yourself. 
If this is not the place to report this bug or if you want me to submit a patch directly feel free to tell me.