summaryrefslogtreecommitdiffstats
path: root/ui/message_center
diff options
context:
space:
mode:
authordharcourt@chromium.org <dharcourt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-20 21:29:52 +0000
committerdharcourt@chromium.org <dharcourt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-20 21:29:52 +0000
commitb1c602bfa89f06d411fbd13961451c913b31d9f4 (patch)
treeeaeba9aa71149476ef5db6f0902777b5234c1ccc /ui/message_center
parentf1b463316a390deae1cd63cdebb6103f19dda98c (diff)
downloadchromium_src-b1c602bfa89f06d411fbd13961451c913b31d9f4.zip
chromium_src-b1c602bfa89f06d411fbd13961451c913b31d9f4.tar.gz
chromium_src-b1c602bfa89f06d411fbd13961451c913b31d9f4.tar.bz2
Fixed an issue with the notification center layout.
A bug in MessageCenterView's Layout() was causing the notification center buttons to be placed in the wrong location when notifications were received while the notification center was updated. Adding an additional layout step in Layout() is a brutish but effective way to fix the problem. A more subtle fix can come later. BUG=222221 R=miket@chromium.org Review URL: https://chromiumcodereview.appspot.com/12512012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189413 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/message_center')
-rw-r--r--ui/message_center/views/message_center_bubble.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/message_center/views/message_center_bubble.cc b/ui/message_center/views/message_center_bubble.cc
index 4fb537e..561e97c 100644
--- a/ui/message_center/views/message_center_bubble.cc
+++ b/ui/message_center/views/message_center_bubble.cc
@@ -481,6 +481,11 @@ size_t MessageCenterView::NumMessageViews() const {
}
void MessageCenterView::Layout() {
+ // Start with a layout so scroller_ has the right width to calculate its
+ // PreferredSize (fixes http://crrev.com/222221), then do another layout after
+ // scroller_ is resized to adjust the button_view_ location.
+ // TODO(dharcourt) Change how things are done so only one layout is required.
+ views::View::Layout();
scroller_->SizeToPreferredSize();
views::View::Layout();
if (GetWidget())