Updates:
Owner: [email protected]
Cc: [email protected] [email protected]
Comment #17 on issue 14900 by [email protected]: Grow the window, don't
shrink the content area
http://code.google.com/p/chromium/issues/detail?id=14900
-> rohit; he's doing view animation
BTW, what I have is:
// Main method to resize browser window subviews. This method should be
called
// when resizing any child of the content view, rather than resizing the
views
// directly. If the view is already the correct height, does not force a
// relayout.
- (void)resizeView:(NSView*)view newHeight:(float)height {
// We should only ever be called for one of the following four views.
// |downloadShelfController_| may be nil. If we are asked to size the
bookmark
// bar directly, its superview must be this controller's content view.
DCHECK(view);
DCHECK(view == [toolbarController_ view] ||
view == [infoBarContainerController_ view] ||
view == [extensionShelfController_ view] ||
view == [downloadShelfController_ view] ||
view == [bookmarkBarController_ view]);
// Change the height of the view and call layoutViews. We set the height
here
// without regard to where the view is on the screen or whether it needs
to
// "grow up" or "grow down." The below call to layoutSubviews will
position
// each view correctly.
NSRect frame = [view frame];
CGFloat heightDelta = height - frame.size.height;
if (heightDelta == 0.0)
return;
NSRect windowFrame = [window_ frame];
windowFrame.origin.y -= heightDelta;
windowFrame.size.height += heightDelta;
[window_ setFrame:windowFrame display:YES];
frame.size.height = height;
// TODO(rohitrao): Determine if calling setFrame: twice is bad.
[view setFrame:frame];
[self layoutSubviews];
}
which kinda works, kills the framerate, and does weird stuff over time to
the window
size.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---