Size dev tools correctly when starting out docked to the right
This commit is contained in:
parent
d9df9bcf47
commit
0b5ab8e43d
1 changed files with 10 additions and 1 deletions
|
@ -89,7 +89,16 @@ void SetActive(content::WebContents* web_contents, bool active) {
|
|||
CGRect frame = NSRectToCGRect(inspectedView.frame);
|
||||
CGRect inspectedViewFrame;
|
||||
CGRect devToolsFrame;
|
||||
CGRectDivide(frame, &inspectedViewFrame, &devToolsFrame, CGRectGetHeight(frame) * 2 / 3, CGRectMaxYEdge);
|
||||
CGFloat amount;
|
||||
CGRectEdge edge;
|
||||
if ([_private->splitView isVertical]) {
|
||||
amount = CGRectGetWidth(frame) * 2 / 3;
|
||||
edge = CGRectMaxXEdge;
|
||||
} else {
|
||||
amount = CGRectGetHeight(frame) * 2 / 3;
|
||||
edge = CGRectMaxYEdge;
|
||||
}
|
||||
CGRectDivide(frame, &inspectedViewFrame, &devToolsFrame, amount, edge);
|
||||
|
||||
inspectedView.frame = NSRectFromCGRect(inspectedViewFrame);
|
||||
devToolsView.frame = NSRectFromCGRect(devToolsFrame);
|
||||
|
|
Loading…
Add table
Reference in a new issue