Fix bug 319131: eliminate blank area at the bottom of the downloads list by making sure that the CHFlippedShinkWrapView that wraps the CHStackView doesn't add any extra padding.

This commit is contained in:
smfr%smfr.org 2005-12-07 04:30:36 +00:00
Родитель e98f04892f
Коммит 5ae73894d2
3 изменённых файлов: 16 добавлений и 0 удалений

Просмотреть файл

@ -103,6 +103,11 @@ static id gSharedProgressController = nil;
mAwaitingTermination = NO;
mShouldCloseWindow = NO;
// we "know" that the superview of the stack view is a CHFlippedShrinkWrapView
// (it has to be, because NSScrollViews have to contain a flipped view)
if ([[mStackView superview] respondsToSelector:@selector(setNoIntrinsicPadding)])
[[mStackView superview] setNoIntrinsicPadding];
// We provide the views for the stack view, from mProgressViewControllers
[mStackView setShowsSeparators:YES];
[mStackView setDataSource:self];

Просмотреть файл

@ -71,6 +71,8 @@ extern NSString* const kStackViewResizedNotificationName;
// padding will normally be calculated automatically from the subview positions,
// but you can set it explicilty if you wish.
- (void)setIntrinsicPadding:(float)inPadding forEdge:(NSRectEdge)inEdge;
// shortcut to set no padding on all edges
- (void)setNoIntrinsicPadding;
- (float)paddingForEdge:(NSRectEdge)inEdge;
- (void)adaptToSubviews;

Просмотреть файл

@ -115,6 +115,15 @@
mPaddingSetManually = YES;
}
- (void)setNoIntrinsicPadding
{
mIntrinsicPadding[NSMinXEdge] = 0.0f;
mIntrinsicPadding[NSMinYEdge] = 0.0f;
mIntrinsicPadding[NSMaxXEdge] = 0.0f;
mIntrinsicPadding[NSMaxYEdge] = 0.0f;
mPaddingSetManually = YES;
}
- (float)paddingForEdge:(NSRectEdge)inEdge
{
if ((int)inEdge < 0 || (int)inEdge > 3)