From 62b9ca4320dcc952db54bfaf867d68ca49ae38a9 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Thu, 1 Nov 2012 13:40:43 +0100 Subject: [PATCH] Fix buttonsize on macstyle when no widget is defined The previous size was incorrect and added far too much height when the widget was undefined. When it was defined it would get its size corrected so the patch should have very little effect on existing widget code. Change-Id: I7c22f4226eda270f0d71050bc4248686b035cb39 Reviewed-by: Jens Bache-Wiig Reviewed-by: J-P Nurmi --- src/widgets/styles/qmacstyle_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index f1d513bc23..522d43dd28 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -6176,7 +6176,7 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt, // Do this by add enough space around the contents so that rounded // borders (including highlighting when active) will show. sz.rwidth() += QMacStylePrivate::PushButtonLeftOffset + QMacStylePrivate::PushButtonRightOffset + 12; - sz.rheight() += QMacStylePrivate::PushButtonTopOffset + QMacStylePrivate::PushButtonBottomOffset; + sz.rheight() += 4; break; case QStyle::CT_MenuItem: if (const QStyleOptionMenuItem *mi = qstyleoption_cast(opt)) {