QCocoaTheme: Fix size of pixmap returned by fileIconPixmap
authorEike Ziller <eike.ziller@digia.com>
Thu, 21 Nov 2013 16:21:57 +0000 (17:21 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 17 Jan 2014 08:13:56 +0000 (09:13 +0100)
commite4d6488ffa46fb3505376d656835470675a59fef
treea892075cfec47dfe7deae4fd46c505649e69dbb9
parentcc2079c85032f51e7bb0ac5a296d25777fb652c0
QCocoaTheme: Fix size of pixmap returned by fileIconPixmap

The code assumed that CGImageForProposedRect would return a sensible
sized image, but that can return basically any size (depending on the
NSImage's image representations). In the case of the bug report this is
a 1024x1024 pixmap when requesting a pixmap of size 64x64 and larger.
Make sure that we return a pixmap of the exact requested size.
For this, themeHint must also return sizes in device coordinates.

Task-number: QTBUG-35009

Change-Id: Iaae11023bab6d4122815ca4010aab6967dfb18a0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
src/plugins/platforms/cocoa/qcocoatheme.mm