mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-26 13:37:03 +00:00
Merge branch 'PopoverContentSize' of https://github.com/Dogild/cappuccino into Dogild-PopoverContentSize
This commit is contained in:
+1
-1
@@ -150,7 +150,7 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0,
|
||||
*/
|
||||
- (void)setContentSize:(CGSize)aSize
|
||||
{
|
||||
[[_contentViewController view] setFrameSize:aSize];
|
||||
[_popoverWindow updateFrameWithSize:aSize];
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -366,6 +366,21 @@ var _CPPopoverWindow_shouldClose_ = 1 << 4,
|
||||
return CPBrowserStyleProperty('transition') && CPBrowserStyleProperty('transitionend');
|
||||
}
|
||||
|
||||
/*!
|
||||
@ignore
|
||||
*/
|
||||
- (void)updateFrameWithSize:(CGSize)aSize
|
||||
{
|
||||
var rect = CGRectMakeZero();
|
||||
rect.size = aSize;
|
||||
rect.origin = [[self contentView] frameOrigin];
|
||||
|
||||
[self setFrame:[self frameRectForContentRect:rect]];
|
||||
|
||||
var point = [self computeOriginFromRect:[_targetView bounds] ofView:_targetView preferredEdge:[_windowView preferredEdge]];
|
||||
[self setFrameOrigin:point];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Actions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user