Source/NSMatrix.m

Source/NSBox.m
Source/NSClipView.m
Source/NSTableView.m
Source/NSOutlineView.m


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13276 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Pierre-Yves Rivaille 2002-03-31 15:46:19 +00:00
parent 464ac5b1c7
commit 558b911361
6 changed files with 115 additions and 15 deletions

View file

@ -51,6 +51,8 @@
#include <AppKit/NSApplication.h>
#include <AppKit/NSMatrix.h>
#include <math.h>
static NSNotificationCenter *nc;
#define STRICT 0
@ -199,8 +201,8 @@ static SEL getSel;
[self setFrame: frameRect];
if ((_numCols > 0) && (_numRows > 0))
_cellSize = NSMakeSize (frameRect.size.width/_numCols,
frameRect.size.height/_numRows);
_cellSize = NSMakeSize (rint(frameRect.size.width/_numCols),
rint(frameRect.size.height/_numRows));
else
_cellSize = NSMakeSize (DEFAULT_CELL_WIDTH, DEFAULT_CELL_HEIGHT);
@ -1671,6 +1673,8 @@ static SEL getSel;
for (j = 0; j < _numCols; j++)
{
NSSize tempSize = [_cells[i][j] cellSize];
tempSize.height = ceil(tempSize.height);
tempSize.width = ceil(tempSize.width);
if (tempSize.width > newSize.width)
{
newSize.width = tempSize.width;
@ -2790,6 +2794,7 @@ static SEL getSel;
}
change.height = change.height / nr;
_cellSize.height += change.height;
_cellSize.height = rint(_cellSize.height);
if (_cellSize.height < 0)
_cellSize.height = 0;
}
@ -2804,6 +2809,7 @@ static SEL getSel;
}
change.width = change.width / nc;
_cellSize.width += change.width;
_cellSize.width = rint(_cellSize.width);
if (_cellSize.width < 0)
_cellSize.width = 0;
}