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

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

Issue 7066024: Adjusted the spacing of the profile tag in maximized opaque frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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/ui/views/frame/opaque_browser_frame_view.cc
===================================================================
--- chrome/browser/ui/views/frame/opaque_browser_frame_view.cc (revision 86419)
+++ chrome/browser/ui/views/frame/opaque_browser_frame_view.cc (working copy)
@@ -100,8 +100,6 @@
const int kVerticalTabBorderInset = 3;
// Y position for profile tag inside the frame.
const int kProfileTagYPosition = 1;
-// Offset y position of profile button and tag by this amount when maximized.
-const int kProfileElementMaximizedYOffset = 6;
// Converts |bounds| from |src|'s coordinate system to |dst|, and checks if
// |pt| is contained within.
@@ -1184,11 +1182,10 @@
profile_button_->GetPreferredSize().width();
// Adjust for different default font sizes on different Windows platforms.
int y_tag = profile_button_->font().GetHeight() < 14 ? 2 : 0;
- int y_maximized_offset = frame_->IsMaximized() ?
- kProfileElementMaximizedYOffset : 0;
+ int maximized = frame_->IsMaximized();
profile_button_->SetBounds(
x_tag,
- y_tag + y_maximized_offset,
+ maximized ? 0 : y_tag,
profile_button_->GetPreferredSize().width(),
profile_button_->GetPreferredSize().height());
@@ -1196,10 +1193,9 @@
profile_tag_->SetVisible(true);
profile_tag_->SetBounds(
x_tag,
- kProfileTagYPosition + y_maximized_offset,
+ maximized ? 0 : kProfileTagYPosition,
profile_button_->GetPreferredSize().width(),
ProfileTagView::kProfileTagHeight);
- profile_tag_->SetVisible(true);
} else {
profile_tag_->SetVisible(false);
}
« 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