Commit d4bbc291 authored by noms@chromium.org's avatar noms@chromium.org

[Win] Fix the size of the themed new avatar button with the new assets

This CL updates the size of the new avatar button that is needed after updating the resources in this CL:
https://codereview.chromium.org/462043003/

BUG=395798

Review URL: https://codereview.chromium.org/460233003

Cr-Commit-Position: refs/heads/master@{#289562}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289562 0039d316-1c4b-4281-b951-d872f2087c98
parent 6856a41d
......@@ -387,19 +387,16 @@ void OpaqueBrowserFrameViewLayout::LayoutNewStyleAvatar(views::View* host) {
int button_x = host->width() - trailing_button_start_ -
button_size_with_offset;
int button_y = CaptionButtonY(false);
// If the window is maximized, the button is 1 pixel too short. Determined
// via visual inspection.
int extra_height = IsTitleBarCondensed() ? 1 : 0;
int button_y = CaptionButtonY(!IsTitleBarCondensed());
trailing_button_start_ += button_size_with_offset;
minimum_size_for_buttons_ += button_size_with_offset;
new_avatar_button_->SetBounds(
button_x,
// Do not include the 1px padding that is added for the caption buttons.
new_avatar_button_->SetBounds(button_x,
button_y,
label_size.width(),
button_y + kCaptionButtonHeightWithPadding + extra_height);
kCaptionButtonHeightWithPadding - 1);
}
void OpaqueBrowserFrameViewLayout::LayoutAvatar(views::View* host) {
......
......@@ -526,8 +526,8 @@ TEST_F(OpaqueBrowserFrameViewLayoutTest, WindowWithNewAvatar) {
ExpectBasicWindowBounds();
// Check the location of the caption button
EXPECT_EQ("385,1 12x20", new_avatar_button_->bounds().ToString());
// Check the location of the avatar button.
EXPECT_EQ("385,1 12x18", new_avatar_button_->bounds().ToString());
// The basic window bounds are (-1, 13 398x29). There should not be an icon
// avatar in the left, and the new avatar button has an offset of 5 to its
// next control.
......
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