KIconEngine: Center icon in requested rect
ClosedPublic

Authored by drosca on Jan 22 2017, 4:42 PM.

Details

Summary

Match the behavior of Qt's internal icon engines.

Test Plan

Rendering is the same for unaffected icons + highdpi still works.
Example case: Render icon into QRect(0, 0, 12, 16) - KIconLoader returns QSize(12, 12)
icon and KIconEngine would draw it at the top of the rect. This patch centers the
icon in provided rect instead.

Diff Detail

Repository
R302 KIconThemes
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
drosca updated this revision to Diff 10437.Jan 22 2017, 4:42 PM
drosca retitled this revision from to KIconEngine: Center icon in requested rect.
drosca updated this object.
drosca edited the test plan for this revision. (Show Details)
drosca added a reviewer: Frameworks.
Restricted Application added a project: Frameworks. · View Herald TranscriptJan 22 2017, 4:42 PM
drosca updated this revision to Diff 10438.Jan 22 2017, 5:25 PM

Add autotest

dfaure accepted this revision.Feb 4 2017, 7:41 PM
dfaure added a reviewer: dfaure.
This revision is now accepted and ready to land.Feb 4 2017, 7:41 PM
This revision was automatically updated to reflect the committed changes.