From 1cb8844470c2073bfa9766f774ef7522e0f1f719 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Fri, 22 Feb 2013 19:45:56 +0000 Subject: [PATCH] Fixed: custom NSBoxes placed in Xcode became smaller in Cappuccino. Without this fix, a regular custom NSBox such as a simple box with a 1px border would become several pixels smaller in Cappuccino. This fix makes sure we only try to adjust the size for primary and secondary type NSBoxes. --- Tools/nib2cib/NSBox.j | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tools/nib2cib/NSBox.j b/Tools/nib2cib/NSBox.j index 0d09265c9..47b52197f 100644 --- a/Tools/nib2cib/NSBox.j +++ b/Tools/nib2cib/NSBox.j @@ -42,7 +42,9 @@ // small hack to position the box pixel perfect var frame = [self frame]; - if (_boxType !== CPBoxSeparator) + // The primary and secondary boxes have a well-like look both in Cocoa and Cappuccino, but there + // are some sizing differences. Regular custom boxes have no size differences. + if (_boxType !== CPBoxSeparator && (_boxType === CPBoxPrimary || _boxType === CPBoxSecondary)) { frame.origin.y += 4; frame.origin.x += 4;