OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/views/avatar_menu_bubble_view.h" | 5 #include "chrome/browser/ui/views/avatar_menu_bubble_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
490 AddChildView(separator_); | 490 AddChildView(separator_); |
491 | 491 |
492 add_profile_link_ = new views::Link( | 492 add_profile_link_ = new views::Link( |
493 l10n_util::GetStringUTF16(IDS_PROFILES_CREATE_NEW_PROFILE_LINK)); | 493 l10n_util::GetStringUTF16(IDS_PROFILES_CREATE_NEW_PROFILE_LINK)); |
494 add_profile_link_->set_listener(this); | 494 add_profile_link_->set_listener(this); |
495 add_profile_link_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 495 add_profile_link_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
496 add_profile_link_->SetBackgroundColor(color()); | 496 add_profile_link_->SetBackgroundColor(color()); |
497 add_profile_link_->SetEnabledColor(SkColorSetRGB(0xe3, 0xed, 0xf6)); | 497 add_profile_link_->SetEnabledColor(SkColorSetRGB(0xe3, 0xed, 0xf6)); |
498 AddChildView(add_profile_link_); | 498 AddChildView(add_profile_link_); |
499 | 499 |
500 PreferredSizeChanged(); | 500 // If the bubble has already been shown then resize and reposition the bubble. |
501 if (GetWidget()) { | |
Peter Kasting
2011/12/12 21:43:43
This is actually kind of worrisome. If we can rea
sail
2011/12/13 01:58:34
Done.
I still needed the Layout/SizeToContents() c
| |
502 Layout(); | |
503 SizeToContents(); | |
504 } | |
501 } | 505 } |
OLD | NEW |