Commit 3f882613 authored by stevet@chromium.org's avatar stevet@chromium.org

Adjusted the spacing of the profile tag in maximized opaque frames.

BUG=83737
TEST=Start Chrome with profiles enabled and in opaque theme (non Aero). Maximize the frame and ensure that the profile tag lines up with the top of the frame like the window controls.
Review URL: http://codereview.chromium.org/7066024

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86475 0039d316-1c4b-4281-b951-d872f2087c98
parent 6c71a72e
...@@ -100,8 +100,6 @@ const int kTabStripIndent = 1; ...@@ -100,8 +100,6 @@ const int kTabStripIndent = 1;
const int kVerticalTabBorderInset = 3; const int kVerticalTabBorderInset = 3;
// Y position for profile tag inside the frame. // Y position for profile tag inside the frame.
const int kProfileTagYPosition = 1; 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 // Converts |bounds| from |src|'s coordinate system to |dst|, and checks if
// |pt| is contained within. // |pt| is contained within.
...@@ -1184,11 +1182,10 @@ void OpaqueBrowserFrameView::LayoutProfileTag() { ...@@ -1184,11 +1182,10 @@ void OpaqueBrowserFrameView::LayoutProfileTag() {
profile_button_->GetPreferredSize().width(); profile_button_->GetPreferredSize().width();
// Adjust for different default font sizes on different Windows platforms. // Adjust for different default font sizes on different Windows platforms.
int y_tag = profile_button_->font().GetHeight() < 14 ? 2 : 0; int y_tag = profile_button_->font().GetHeight() < 14 ? 2 : 0;
int y_maximized_offset = frame_->IsMaximized() ? int maximized = frame_->IsMaximized();
kProfileElementMaximizedYOffset : 0;
profile_button_->SetBounds( profile_button_->SetBounds(
x_tag, x_tag,
y_tag + y_maximized_offset, maximized ? 0 : y_tag,
profile_button_->GetPreferredSize().width(), profile_button_->GetPreferredSize().width(),
profile_button_->GetPreferredSize().height()); profile_button_->GetPreferredSize().height());
...@@ -1196,10 +1193,9 @@ void OpaqueBrowserFrameView::LayoutProfileTag() { ...@@ -1196,10 +1193,9 @@ void OpaqueBrowserFrameView::LayoutProfileTag() {
profile_tag_->SetVisible(true); profile_tag_->SetVisible(true);
profile_tag_->SetBounds( profile_tag_->SetBounds(
x_tag, x_tag,
kProfileTagYPosition + y_maximized_offset, maximized ? 0 : kProfileTagYPosition,
profile_button_->GetPreferredSize().width(), profile_button_->GetPreferredSize().width(),
ProfileTagView::kProfileTagHeight); ProfileTagView::kProfileTagHeight);
profile_tag_->SetVisible(true);
} else { } else {
profile_tag_->SetVisible(false); profile_tag_->SetVisible(false);
} }
......
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