mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 20:57:38 +00:00
* Source/NSScrollView.m (-initWithCoder:): Don't add the vertical
scroller directly into the subviews. Call tile to position all subviews correctly. Based on patch by Quentin Mathe <quentin.mathe@gmail.com>. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28625 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ce6009fe8b
commit
c3d42b5370
2 changed files with 22 additions and 14 deletions
|
@ -1,3 +1,10 @@
|
|||
2009-09-07 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSScrollView.m (-initWithCoder:): Don't add the vertical
|
||||
scroller directly into the subviews. Call tile to position all
|
||||
subviews correctly.
|
||||
Based on patch by Quentin Mathe <quentin.mathe@gmail.com>.
|
||||
|
||||
2009-09-07 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSSearchFieldCell.h: Add version #ifdef's.
|
||||
|
|
|
@ -1559,24 +1559,24 @@ static float scrollerWidth;
|
|||
_borderType = scrollViewFlags.border;
|
||||
}
|
||||
|
||||
if (content != nil)
|
||||
/* FIXME: This should only happen when we load a Mac NIB file.
|
||||
And as far as I can tell tile is handling this correctly.
|
||||
if (vScroller != nil && _hasVertScroller && content != nil)
|
||||
{
|
||||
// Move the content view since it is not moved when we retile.
|
||||
NSRect frame = [content frame];
|
||||
float w = [vScroller frame].size.width;
|
||||
|
||||
if (_hasVertScroller)
|
||||
{
|
||||
//
|
||||
// Slide the content view over, since on Mac OS X the scroller is on the
|
||||
// right, the content view is not properly positioned since our scroller
|
||||
// is on the left.
|
||||
//
|
||||
frame.origin.x += w;
|
||||
[content setFrame: frame];
|
||||
}
|
||||
//
|
||||
// Slide the content view over, since on Mac OS X the scroller is on the
|
||||
// right, the content view is not properly positioned since our scroller
|
||||
// is on the left.
|
||||
//
|
||||
frame.origin.x += w;
|
||||
[content setFrame: frame];
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
if (hScroller != nil && _hasHorizScroller)
|
||||
{
|
||||
[self setHorizontalScroller: hScroller];
|
||||
|
@ -1595,10 +1595,10 @@ static float scrollerWidth;
|
|||
_headerClipView = [aDecoder decodeObjectForKey: @"NSHeaderClipView"];
|
||||
}
|
||||
|
||||
// [self tile];
|
||||
// set the document view into the content.
|
||||
[self addSubview: vScroller];
|
||||
[self setContentView: content];
|
||||
[self tile];
|
||||
// Reenable notification sending.
|
||||
[docView setPostsFrameChangedNotifications: post_frame];
|
||||
[docView setPostsBoundsChangedNotifications: post_bound];
|
||||
}
|
||||
|
@ -1648,6 +1648,7 @@ static float scrollerWidth;
|
|||
{
|
||||
NSLog(@"unknown NSScrollView version (%d)", version);
|
||||
DESTROY(self);
|
||||
return nil;
|
||||
}
|
||||
[self tile];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue