From cba40d9e2e1cc1d078e855b43f21c82bb0d7d275 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Mon, 24 Jun 2013 18:30:10 +0000 Subject: Ensure +[GTMUILocalizerAndLayoutTweaker sizeToFitFixedHeightTextField:] sets an integral size. When resizing labels it's possible to get fractional sizes. This CL fixes the problem by using integral values. DELTA=17 (17 added, 0 deleted, 0 changed) --- AppKit/GTMUILocalizerAndLayoutTweaker.m | 3 +++ 1 file changed, 3 insertions(+) (limited to 'AppKit/GTMUILocalizerAndLayoutTweaker.m') diff --git a/AppKit/GTMUILocalizerAndLayoutTweaker.m b/AppKit/GTMUILocalizerAndLayoutTweaker.m index 27a4649..d2ff80c 100644 --- a/AppKit/GTMUILocalizerAndLayoutTweaker.m +++ b/AppKit/GTMUILocalizerAndLayoutTweaker.m @@ -313,6 +313,9 @@ static const CGFloat kWrapperStringSlop = 0.9; if (minWidth > fixedSize.width) { finalSize.width = minWidth; } + // Make integral. + finalSize.width = ceil(fixedSize.width); + finalSize.height = ceil(fixedSize.height); if (!NSEqualSizes(fixedSize, finalSize)) { [textField setFrameSize:finalSize]; } -- cgit v1.2.3