diff options
author | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2009-11-03 10:15:38 (GMT) |
---|---|---|
committer | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2009-11-03 10:31:50 (GMT) |
commit | c8a7b0430120b391e356a821390aaaebacbbb006 (patch) | |
tree | a5742623a0308d103603cc64e94066f74152e381 /src/gui | |
parent | 93e9bc06427c6a8e1b6d6f939cf53ae5c95e0827 (diff) | |
download | Qt-c8a7b0430120b391e356a821390aaaebacbbb006.zip Qt-c8a7b0430120b391e356a821390aaaebacbbb006.tar.gz Qt-c8a7b0430120b391e356a821390aaaebacbbb006.tar.bz2 |
Toolbar Icons are clipped on Leopard in Cocoa port.
Scale the pixmap to correct size (16,16) before setting as the image for
the Document Icon button.
Reviewed-by: Denis
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 79f55a1..9270220 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -3026,7 +3026,8 @@ void QWidgetPrivate::setWindowIcon_sys(bool forceReset) if (icon.isNull()) { [iconButton setImage:nil]; } else { - NSImage *image = static_cast<NSImage *>(qt_mac_create_nsimage(*pm)); + QPixmap scaled = pm->scaled(QSize(16,16), Qt::KeepAspectRatio, Qt::SmoothTransformation); + NSImage *image = static_cast<NSImage *>(qt_mac_create_nsimage(scaled)); [iconButton setImage:image]; [image release]; } |