diff options
author | jonross@chromium.org <jonross@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-16 18:58:00 +0000 |
---|---|---|
committer | jonross@chromium.org <jonross@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-16 18:58:00 +0000 |
commit | dc65e1435558e233745cb885ed440f91fddba722 (patch) | |
tree | 105541826d2dfbaba288071a94ecc396710eb3af /ash/system | |
parent | 83d7dbc292f912f4524fb82ad27e1749290cb018 (diff) | |
download | chromium_src-dc65e1435558e233745cb885ed440f91fddba722.zip chromium_src-dc65e1435558e233745cb885ed440f91fddba722.tar.gz chromium_src-dc65e1435558e233745cb885ed440f91fddba722.tar.bz2 |
Stop Status Area Creation Animations
TrayBackgroundViews animate their visual state transitions. However upon creation some set their visibility to false. This is causing them to first appear on screen, only to animate to hidden. It is not desireable, especially for startup.
Switch the children to set their initial visibility via View::SetVisible instead of TrayBackgroundView::SetVisible in order to not animate. Those items that should be visible based on the login status are already receiving login state notifications and will become visible accordingly.
BUG=383005
Review URL: https://codereview.chromium.org/329993003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277506 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system')
4 files changed, 2 insertions, 3 deletions
diff --git a/ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc b/ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc index 88d74c4..63eadf1 100644 --- a/ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc +++ b/ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc @@ -64,7 +64,6 @@ VirtualKeyboardTray::VirtualKeyboardTray(StatusAreaWidget* status_area_widget) tray_container()->AddChildView(button_); SetContentsBackground(); - SetVisible(false); // The Shell may not exist in some unit tests. if (Shell::HasInstance()) { Shell::GetInstance()->system_tray_notifier()-> diff --git a/ash/system/overview/overview_button_tray.cc b/ash/system/overview/overview_button_tray.cc index a81edc3..b56efa9 100644 --- a/ash/system/overview/overview_button_tray.cc +++ b/ash/system/overview/overview_button_tray.cc @@ -40,7 +40,6 @@ OverviewButtonTray::OverviewButtonTray(StatusAreaWidget* status_area_widget) bundle.GetImageNamed(IDR_AURA_UBER_TRAY_OVERVIEW_MODE).ToImageSkia()); SetIconBorderForShelfAlignment(); tray_container()->AddChildView(icon_); - UpdateIconVisibility(); Shell::GetInstance()->AddShellObserver(this); } diff --git a/ash/system/tray/tray_background_view.cc b/ash/system/tray/tray_background_view.cc index a166da3..bcf04a2 100644 --- a/ash/system/tray/tray_background_view.cc +++ b/ash/system/tray/tray_background_view.cc @@ -323,6 +323,8 @@ TrayBackgroundView::TrayBackgroundView(StatusAreaWidget* status_area_widget) SetPaintToLayer(true); SetFillsBoundsOpaquely(false); + // Start the tray items not visible, because visibility changes are animated. + views::View::SetVisible(false); } TrayBackgroundView::~TrayBackgroundView() { diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc index 45280f9..de999e9 100644 --- a/ash/system/web_notification/web_notification_tray.cc +++ b/ash/system/web_notification/web_notification_tray.cc @@ -305,7 +305,6 @@ WebNotificationTray::WebNotificationTray(StatusAreaWidget* status_area_widget) tray_container()->AddChildView(button_); SetContentsBackground(); tray_container()->SetBorder(views::Border::NullBorder()); - SetVisible(false); message_center_tray_.reset(new message_center::MessageCenterTray( this, message_center::MessageCenter::Get())); |