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

Unified Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.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/browser_non_client_frame_view_ash.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
index 0c16e86d87670d2f36c7d0ef646c1d5fd7857df3..98f40fc89f790341307083cfbca261a15761b771 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
@@ -11,7 +11,6 @@
#include "chrome/browser/ui/ash/chrome_shell_delegate.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/immersive_fullscreen_configuration.h"
-#include "chrome/browser/ui/views/avatar_label.h"
#include "chrome/browser/ui/views/avatar_menu_button.h"
#include "chrome/browser/ui/views/frame/browser_frame.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
@@ -135,10 +134,6 @@ BrowserNonClientFrameViewAsh::GetTabStripInsets(bool force_restored) const {
int left = avatar_button() ? kAvatarSideSpacing +
browser_view()->GetOTRAvatarIcon().width() + kAvatarSideSpacing :
kTabstripLeftSpacing;
- if (avatar_label()) {
- left += avatar_label()->GetPreferredSize().width() +
- views::kRelatedControlHorizontalSpacing;
- }
int right = frame_painter_->GetRightInset() + kTabstripRightSpacing;
return TabStripInsets(NonClientTopBorderHeight(force_restored), left, right);
}
@@ -420,8 +415,6 @@ void BrowserNonClientFrameViewAsh::LayoutAvatar() {
if (immersive_controller->IsEnabled() &&
!immersive_controller->IsRevealed()) {
avatar_button()->SetBoundsRect(gfx::Rect());
- if (avatar_label())
- avatar_label()->SetBoundsRect(gfx::Rect());
return;
}
}
@@ -437,16 +430,6 @@ void BrowserNonClientFrameViewAsh::LayoutAvatar() {
incognito_icon.width(),
avatar_bottom - avatar_y);
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(),
- size.height());
- avatar_label()->SetBoundsRect(label_bounds);
- }
}
bool BrowserNonClientFrameViewAsh::ShouldPaint() const {

Powered by Google App Engine
This is Rietveld 408576698