From c8a7b0430120b391e356a821390aaaebacbbb006 Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Tue, 3 Nov 2009 11:15:38 +0100 Subject: 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 --- src/gui/kernel/qwidget_mac.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(qt_mac_create_nsimage(*pm)); + QPixmap scaled = pm->scaled(QSize(16,16), Qt::KeepAspectRatio, Qt::SmoothTransformation); + NSImage *image = static_cast(qt_mac_create_nsimage(scaled)); [iconButton setImage:image]; [image release]; } -- cgit v0.12