mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 18:00:37 +00:00
* Source/GSGuiPrivate.h: New rounding rounding function
GSRoundTowardsInfinity which is simply floor(x+0.5) * Source/NSBrowser.m: * Source/NSSliderCell.m: * Source/NSButtonCell.m: * Source/NSClipView.m: * Source/NSOutlineView.m: * Source/NSRulerView.m: Switch rint[f] to GSRoundTowardsInfinity git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33539 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
adca33937f
commit
c7e05f2c7b
8 changed files with 45 additions and 19 deletions
|
@ -44,8 +44,6 @@
|
|||
|
||||
#include <math.h>
|
||||
|
||||
DEFINE_RINT_IF_MISSING
|
||||
|
||||
@interface NSClipView (Private)
|
||||
- (void) _scrollToPoint: (NSPoint)aPoint;
|
||||
@end
|
||||
|
@ -444,8 +442,8 @@ static inline NSRect integralRect (NSRect rect, NSView *view)
|
|||
*/
|
||||
if (_copiesOnScroll)
|
||||
{
|
||||
new.x = _bounds.origin.x + (rint(new.x - _bounds.origin.x));
|
||||
new.y = _bounds.origin.y + (rint(new.y - _bounds.origin.y));
|
||||
new.x = _bounds.origin.x + (GSRoundTowardsInfinity(new.x - _bounds.origin.x));
|
||||
new.y = _bounds.origin.y + (GSRoundTowardsInfinity(new.y - _bounds.origin.y));
|
||||
}
|
||||
|
||||
return new;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue