Chrome OS: Prevent overlapping of title and "x" button for devtools window

BUG=46408
TEST=Title for detached devtools window doesn't overlap with "x" button for long URLs.

Review URL: http://codereview.chromium.org/2868075

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54104 0039d316-1c4b-4281-b951-d872f2087c98
parent 1712282d
...@@ -957,24 +957,28 @@ void OpaqueBrowserFrameView::LayoutWindowControls() { ...@@ -957,24 +957,28 @@ void OpaqueBrowserFrameView::LayoutWindowControls() {
close_button_size.height()); close_button_size.height());
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
minimize_button_->SetVisible(!is_maximized); if (is_maximized) {
restore_button_->SetVisible(!is_maximized); minimize_button_->SetVisible(false);
maximize_button_->SetVisible(!is_maximized); restore_button_->SetVisible(false);
maximize_button_->SetVisible(false);
if (browser_view_->browser()->type() == Browser::TYPE_DEVTOOLS) if (browser_view_->browser()->type() == Browser::TYPE_DEVTOOLS) {
close_button_->SetVisible(true); close_button_->SetVisible(true);
else minimize_button_->SetBounds(close_button_->bounds().x(), 0, 0, 0);
close_button_->SetVisible(!is_maximized); } else {
close_button_->SetVisible(false);
// Set the bounds of the minimize button so that we don't have to change
// other places that rely on the bounds. Put it slightly to the right
// of the edge of the view, so that when we remove the spacing it lines
// up with the edge.
minimize_button_->SetBounds(
width() - FrameBorderThickness() + kNewTabCaptionMaximizedSpacing,
0, 0, 0);
}
if (is_maximized) {
// Set the bounds of the minimize button so that we don't have to change
// other places that rely on the bounds. Put it slightly to the right
// of the edge of the view, so that when we remove the spacing it lines
// up with the edge.
minimize_button_->SetBounds(
width() - FrameBorderThickness() + kNewTabCaptionMaximizedSpacing, 0, 0,
0);
return; return;
} else {
close_button_->SetVisible(true);
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment