summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-11-03 11:15:38 +0100
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-11-03 11:31:50 +0100
commitc8a7b0430120b391e356a821390aaaebacbbb006 (patch)
treea5742623a0308d103603cc64e94066f74152e381
parent93e9bc06427c6a8e1b6d6f939cf53ae5c95e0827 (diff)
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
-rw-r--r--src/gui/kernel/qwidget_mac.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 79f55a101d..9270220d31 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];
}