mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 23:30:48 +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
80e65c7a44
commit
e715d53fdd
1 changed files with 10 additions and 9 deletions
|
@ -1572,7 +1572,9 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
// then the column must be visible
|
// then the column must be visible
|
||||||
if ((_lastColumnLoaded == 0) ||
|
if ((_lastColumnLoaded == 0) ||
|
||||||
(_lastColumnLoaded <= (_maxVisibleColumns - 1)))
|
(_lastColumnLoaded <= (_maxVisibleColumns - 1)))
|
||||||
[_horizontalScroller setEnabled: NO];
|
{
|
||||||
|
[_horizontalScroller setEnabled: NO];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!_skipUpdateScroller)
|
if (!_skipUpdateScroller)
|
||||||
|
@ -2818,15 +2820,14 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
[matrix setCellSize: ms];
|
[matrix setCellSize: ms];
|
||||||
mr = [matrix frame];
|
mr = [matrix frame];
|
||||||
|
|
||||||
// matrix smaller than scrollview's content
|
// this will automatically move the matrix on top if it's not
|
||||||
if (mr.size.height < cs.height)
|
// yet the sc's document view, otherwise it will not move it
|
||||||
{
|
|
||||||
// view requires origin adjustment for it to appear at top
|
|
||||||
mr.origin.y = cs.height;
|
|
||||||
[matrix setFrame: mr];
|
|
||||||
}
|
|
||||||
|
|
||||||
[sc setDocumentView: matrix];
|
[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…
Add table
Add a link
Reference in a new issue