[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #27930] Offsetting a subview breaks when the parent view is resized

From: Fred Kiefer
Subject: [bug #27930] Offsetting a subview breaks when the parent view is resized
Date: Thu, 05 Nov 2009 07:55:39 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv: Gecko/2009090900 SUSE/3.0.14-0.1.2 Firefox/3.0.14

Update of bug #27930 (project gnustep):

                  Status:                    None => Invalid                
             Assigned to:                    None => FredKiefer             
             Open/Closed:                    Open => Declined               


Follow-up Comment #2:

It took me some time to pin down the problem in your code. In the end it
turned out to be quite simple. In your _adjustFrameHeightForNewFrame: method
you set the origin of the subview relative to the origin of the super view:

        ourFrame.origin.y = newFrame.origin.y + _offset;

This is always wrong, as these two frames are in different coordinate
systems. The correct code looks like this:

        ourFrame.origin.y = _offset;

Why did it work on Apple but fail on GNUstep? Apple seems to have the origin
of the content view always at (0, 0). This is not true for GNUstep.

But then there isn't any reason for all your special code. Just set the
offset of your view once when you create it and make the height resizable as
well, that way the system should keep track of all this computation.


Reply to this item at:


  Nachricht geschickt von/durch Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]