зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
e98f04892f
Коммит
5ae73894d2
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче