Adjust y position if menu bar is visible
This commit is contained in:
parent
2a20630f2f
commit
dbddf5028a
1 changed files with 6 additions and 2 deletions
|
@ -1164,8 +1164,10 @@ gfx::Rect NativeWindowViews::ContentBoundsToWindowBounds(
|
|||
window_->non_client_view()->GetWindowBoundsForClientBounds(dpi_bounds));
|
||||
#endif
|
||||
|
||||
if (menu_bar_ && menu_bar_visible_)
|
||||
if (menu_bar_ && menu_bar_visible_) {
|
||||
window_bounds.set_y(window_bounds.y() - kMenuBarHeight);
|
||||
window_bounds.set_height(window_bounds.height() + kMenuBarHeight);
|
||||
}
|
||||
return window_bounds;
|
||||
}
|
||||
|
||||
|
@ -1190,8 +1192,10 @@ gfx::Rect NativeWindowViews::WindowBoundsToContentBounds(
|
|||
display::win::ScreenWin::ScreenToDIPSize(hwnd, content_bounds.size()));
|
||||
#endif
|
||||
|
||||
if (menu_bar_ && menu_bar_visible_)
|
||||
if (menu_bar_ && menu_bar_visible_) {
|
||||
content_bounds.set_y(content_bounds.y() + kMenuBarHeight);
|
||||
content_bounds.set_height(content_bounds.height() - kMenuBarHeight);
|
||||
}
|
||||
return content_bounds;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue