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

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

Issue 2893343002: Resize avatar button as appropriate for opaque browser frame. (Closed)
Patch Set: comment Created 3 years, 7 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.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
index 44845e01404d0aa646c3e06942d07c8b36fa60ec..a52ceb8c4d1db8610cc9bd452fbf7caa05f4ff2e 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
@@ -71,6 +71,14 @@ views::View* BrowserNonClientFrameView::GetProfileSwitcherView() const {
void BrowserNonClientFrameView::UpdateClientArea() {}
+void BrowserNonClientFrameView::ChildPreferredSizeChanged(views::View* child) {
+ if (child == GetProfileSwitcherView()) {
+ // Perform a re-layout if the avatar button has changed, since that can
+ // affect the size of the tabs.
+ frame()->GetRootView()->Layout();
+ }
+}
+
void BrowserNonClientFrameView::VisibilityChanged(views::View* starting_from,
bool is_visible) {
// UpdateTaskbarDecoration() calls DrawTaskbarDecoration(), but that does

Powered by Google App Engine
This is Rietveld 408576698