Minor fix for resizing in flipped views.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3927 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-03-16 08:18:16 +00:00
parent ad3f5b47e2
commit 288f80c15c

View file

@ -945,7 +945,7 @@ static SEL invalidateSel = @selector(_invalidateCoordinates);
} }
if (autoresizingMask & (NSViewMaxYMargin | NSViewMinYMargin)) if (autoresizingMask & (NSViewMaxYMargin | NSViewMinYMargin))
{ {
if ([self isFlipped] == YES) if ([super_view isFlipped] == YES)
{ {
if (autoresizingMask & NSViewMaxYMargin) if (autoresizingMask & NSViewMaxYMargin)
{ {
@ -1955,6 +1955,11 @@ static SEL invalidateSel = @selector(_invalidateCoordinates);
(*appImp)(matrixToWindow, appSel, frameMatrix); (*appImp)(matrixToWindow, appSel, frameMatrix);
if ([self isFlipped] != wasFlipped) if ([self isFlipped] != wasFlipped)
{ {
/*
* The flipping process must result in a coordinate system that
* exactly overlays the original. To do that, we must translate
* the origin by the height of the view.
*/
flip->matrix.ty = bounds.size.height; flip->matrix.ty = bounds.size.height;
(*appImp)(matrixToWindow, appSel, flip); (*appImp)(matrixToWindow, appSel, flip);
} }