Show devtools window in the middle of display
This commit is contained in:
parent
0ef2857534
commit
5b4a42f7e9
1 changed files with 2 additions and 2 deletions
|
@ -183,8 +183,8 @@ InspectableWebContentsImpl::InspectableWebContentsImpl(
|
|||
gfx::Rect display = gfx::Screen::GetNativeScreen()
|
||||
->GetDisplayNearestWindow(web_contents->GetNativeView()).bounds();
|
||||
if (!IsPointInRect(devtools_bounds_.origin(), display)) {
|
||||
devtools_bounds_.set_x(0);
|
||||
devtools_bounds_.set_y(0);
|
||||
devtools_bounds_.set_x(display.x() + (display.width() - devtools_bounds_.width()) / 2);
|
||||
devtools_bounds_.set_y(display.y() + (display.height() - devtools_bounds_.height()) / 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue