mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 03:11:18 +00:00
Fixed position of new matrix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8841 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
023ba907c1
commit
5e64aba48d
1 changed files with 10 additions and 9 deletions
|
@ -1572,7 +1572,9 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
|||
// then the column must be visible
|
||||
if ((_lastColumnLoaded == 0) ||
|
||||
(_lastColumnLoaded <= (_maxVisibleColumns - 1)))
|
||||
[_horizontalScroller setEnabled: NO];
|
||||
{
|
||||
[_horizontalScroller setEnabled: NO];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_skipUpdateScroller)
|
||||
|
@ -2818,15 +2820,14 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
|||
[matrix setCellSize: ms];
|
||||
mr = [matrix frame];
|
||||
|
||||
// matrix smaller than scrollview's content
|
||||
if (mr.size.height < cs.height)
|
||||
{
|
||||
// view requires origin adjustment for it to appear at top
|
||||
mr.origin.y = cs.height;
|
||||
[matrix setFrame: mr];
|
||||
}
|
||||
|
||||
// this will automatically move the matrix on top if it's not
|
||||
// yet the sc's document view, otherwise it will not move it
|
||||
[sc setDocumentView: matrix];
|
||||
|
||||
// so we do it manually anyway - the clipview's coordinate
|
||||
// system is flipped - we want the matrix to appear on top
|
||||
mr.origin.y = cs.height;
|
||||
[matrix setFrame: mr];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue