Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Unified Diff: chrome/browser/views/frame/opaque_browser_frame_view.cc

Issue 2868075: Chrome OS: Prevent overlapping of title and "x" button for devtools window... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/opaque_browser_frame_view.cc
===================================================================
--- chrome/browser/views/frame/opaque_browser_frame_view.cc (revision 53772)
+++ chrome/browser/views/frame/opaque_browser_frame_view.cc (working copy)
@@ -957,24 +957,28 @@
close_button_size.height());
#if defined(OS_CHROMEOS)
- minimize_button_->SetVisible(!is_maximized);
- restore_button_->SetVisible(!is_maximized);
- maximize_button_->SetVisible(!is_maximized);
+ if (is_maximized) {
whywhat 2010/07/29 06:13:44 Do we ever have is_maximized set to false in Chrom
Dmitry Polukhin 2010/07/29 06:28:24 It looks like no but I can't be 100% sure.
+ minimize_button_->SetVisible(false);
+ restore_button_->SetVisible(false);
+ maximize_button_->SetVisible(false);
- if (browser_view_->browser()->type() == Browser::TYPE_DEVTOOLS)
- close_button_->SetVisible(true);
- else
- close_button_->SetVisible(!is_maximized);
+ if (browser_view_->browser()->type() == Browser::TYPE_DEVTOOLS) {
+ close_button_->SetVisible(true);
+ minimize_button_->SetBounds(close_button_->bounds().x(), 0, 0, 0);
+ } 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;
+ } else {
+ close_button_->SetVisible(true);
whywhat 2010/07/29 06:13:44 Shoudn't we set the rest buttons visible here too?
Dmitry Polukhin 2010/07/29 06:28:24 No, because visibility for all other buttons will
}
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698