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

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

Issue 18083014: Create new look of the avatar label. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unneeded code and use fixed font size. Created 7 years, 5 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
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 f1d8ba599c940e8351b1882d3ca433e0263edf25..6a1750faf6a9068da436b73a259892caab6c5049 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -105,10 +105,6 @@ gfx::Rect GlassBrowserFrameView::GetBoundsForTabStrip(
int tabstrip_x = browser_view()->ShouldShowAvatar() ?
(avatar_bounds_.right() + kAvatarRightSpacing) :
NonClientBorderThickness() + kTabStripIndent;
- if (avatar_label()) {
- tabstrip_x += avatar_label()->bounds().width() +
- views::kRelatedControlHorizontalSpacing;
- }
// In RTL languages, we have moved an avatar icon left by the size of window
// controls to prevent it from being rendered over them. So, we use its x
// position to move this tab strip left when maximized. Also, we can render
@@ -209,9 +205,7 @@ int GlassBrowserFrameView::NonClientHitTest(const gfx::Point& point) {
// See if the point is within the avatar menu button or within the avatar
// label.
- if ((avatar_button() &&
- avatar_button()->GetMirroredBounds().Contains(point)) ||
- (avatar_label() && avatar_label()->GetMirroredBounds().Contains(point)))
+ if (avatar_button() && avatar_button()->GetMirroredBounds().Contains(point))
return HTCLIENT;
int frame_component = frame()->client_view()->NonClientHitTest(point);
@@ -428,17 +422,6 @@ void GlassBrowserFrameView::LayoutAvatar() {
browser_view()->ShouldShowAvatar() ? (avatar_bottom - avatar_y) : 0);
if (avatar_button())
avatar_button()->SetBoundsRect(avatar_bounds_);
-
- if (avatar_label()) {
- gfx::Size size = avatar_label()->GetPreferredSize();
- int label_height = std::min(avatar_bounds_.height(), size.height());
- gfx::Rect label_bounds(
- avatar_bounds_.right() + views::kRelatedControlHorizontalSpacing,
- avatar_y + (avatar_bounds_.height() - label_height) / 2,
- size.width(),
- browser_view()->ShouldShowAvatar() ? size.height() : 0);
- avatar_label()->SetBoundsRect(label_bounds);
- }
}
void GlassBrowserFrameView::LayoutClientView() {

Powered by Google App Engine
This is Rietveld 408576698