Author: rmottola Date: Mon Jan 5 15:24:28 2015 New Revision: 38278 URL: http://svn.gna.org/viewcvs/gnustep?rev=38278&view=rev Log: floor rects
Modified: libs/gui/trunk/ChangeLog libs/gui/trunk/Source/NSBox.m Modified: libs/gui/trunk/ChangeLog URL: http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/ChangeLog?rev=38278&r1=38277&r2=38278&view=diff ============================================================================== --- libs/gui/trunk/ChangeLog (original) +++ libs/gui/trunk/ChangeLog Mon Jan 5 15:24:28 2015 @@ -2,6 +2,9 @@ * Source/GSToolbarView.m (menuForEvent) Use protocol not class for NSMenuItem. + + * Source/NSBox.m + floor() rects. 2014-12-26 German Arias <germanan...@gmx.es> Modified: libs/gui/trunk/Source/NSBox.m URL: http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/NSBox.m?rev=38278&r1=38277&r2=38278&view=diff ============================================================================== --- libs/gui/trunk/Source/NSBox.m (original) +++ libs/gui/trunk/Source/NSBox.m Mon Jan 5 15:24:28 2015 @@ -3,7 +3,7 @@ <abstract>Simple box view that can display a border and title </abstract> - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996-2015 Free Software Foundation, Inc. Author: Scott Christley <sco...@net-community.com> Date: 1996 @@ -734,7 +734,7 @@ - (2 * borderSize.height); // center the title cell - c = (_bounds.size.width - titleSize.width) / 2; + c = floor((_bounds.size.width - titleSize.width) / 2); if (c < 0) c = 0; _title_rect.origin.x = _bounds.origin.x + c; _title_rect.origin.y = _bounds.origin.y + _border_rect.size.height @@ -770,7 +770,7 @@ r.size.height -= titleSize.height + borderSize.height; // center the title cell - c = (_border_rect.size.width - titleSize.width) / 2; + c = floor((_border_rect.size.width - titleSize.width) / 2); if (c < 0) c = 0; _title_rect.origin.x = _border_rect.origin.x + c; _title_rect.origin.y @@ -825,7 +825,7 @@ // r.size.height -= titleSize.height + borderSize.height; // center the title cell - c = (_border_rect.size.width - titleSize.width) / 2; + c = floor((_border_rect.size.width - titleSize.width) / 2); if (c < 0) c = 0; _title_rect.origin.x = _border_rect.origin.x + c; _title_rect.origin.y @@ -882,7 +882,7 @@ r.size.height -= (titleSize.height / 2) + borderSize.height; */ // center the title cell - c = (_border_rect.size.width - titleSize.width) / 2; + c = floor((_border_rect.size.width - titleSize.width) / 2); if (c < 0) c = 0; _title_rect.origin.x = c; _title_rect.origin.y = 0; @@ -916,7 +916,7 @@ - (2 * borderSize.height); // center the title cell - c = (_border_rect.size.width - titleSize.width) / 2; + c = floor((_border_rect.size.width - titleSize.width) / 2); if (c < 0) c = 0; _title_rect.origin.x = c; _title_rect.origin.y = 0; @@ -951,7 +951,7 @@ r.size.height -= titleSize.height + borderSize.height; // center the title cell - c = (_border_rect.size.width - titleSize.width) / 2; + c = floor((_border_rect.size.width - titleSize.width) / 2); if (c < 0) c = 0; _title_rect.origin.x = _border_rect.origin.x + c; _title_rect.origin.y = _border_rect.origin.y + borderSize.height; _______________________________________________ Gnustep-cvs mailing list Gnustep-cvs@gna.org https://mail.gna.org/listinfo/gnustep-cvs