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

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

Issue 297143008: [Win] UI fixes for the new avatar button/bubble auth errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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/profiles/new_avatar_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/glass_browser_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index db564621df08246890c1e588008508f6be50df3e..0813fa337d1383e5da797c26d503e097c776551e 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -447,25 +447,24 @@ void GlassBrowserFrameView::LayoutNewStyleAvatar() {
return;
gfx::Size label_size = new_avatar_button()->GetPreferredSize();
- int button_size_with_offset = kNewAvatarButtonOffset + label_size.width();
int button_x = frame()->GetMinimizeButtonOffset() -
kNewAvatarButtonOffset - label_size.width();
if (base::i18n::IsRTL())
button_x = width() - frame()->GetMinimizeButtonOffset() +
kNewAvatarButtonOffset;
- int button_y = frame()->IsMaximized() ? NonClientTopBorderHeight() : 1;
- // If the window is maximized, the button is 2 pixels too tall. Determined
- // via visual inspection.
- int height_to_subtract = frame()->IsMaximized() ? 2 : 0;
+ // We need to offset the button correctly in maximized mode, so that the
+ // custom glass style aligns with the native control glass style. The
+ // glass shadow is off by 1px, which was determined by visual inspection.
+ int button_y = !frame()->IsMaximized() ? 1 :
+ NonClientTopBorderHeight() + kTabstripTopShadowThickness - 1;
new_avatar_button()->SetBounds(
button_x,
button_y,
label_size.width(),
- button_y + gfx::win::GetSystemMetricsInDIP(SM_CXMENUSIZE) -
- height_to_subtract);
+ gfx::win::GetSystemMetricsInDIP(SM_CYMENUSIZE) + 1);
}
void GlassBrowserFrameView::LayoutAvatar() {
« no previous file with comments | « no previous file | chrome/browser/ui/views/profiles/new_avatar_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698