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

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

Issue 460233003: [Win] Fix the size of the themed new avatar button with the new assets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc » ('j') | 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_layout.cc
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
index b23e670975b0cc52050861b72e8572b484f7326b..07eca8e292372587297b3d9a7106f9b18784d14a 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
@@ -387,19 +387,18 @@ 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;
+ // |kCaptionButtonHeightWithPadding| adds a 1px padding to the height
msw 2014/08/12 21:22:56 Clarify why the 1px matters or remove the comment
noms (inactive) 2014/08/12 21:44:47 The comment at the top of the file for kCaptionBut
+ // of the button.
new_avatar_button_->SetBounds(
button_x,
msw 2014/08/12 21:22:56 nit: move this to the line above, indent others to
noms (inactive) 2014/08/12 21:44:47 Done.
button_y,
label_size.width(),
- button_y + kCaptionButtonHeightWithPadding + extra_height);
+ kCaptionButtonHeightWithPadding);
}
void OpaqueBrowserFrameViewLayout::LayoutAvatar(views::View* host) {
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698