| Index: ash/common/system/chromeos/audio/volume_view.cc
|
| diff --git a/ash/common/system/chromeos/audio/volume_view.cc b/ash/common/system/chromeos/audio/volume_view.cc
|
| index 30ed63db42e22d847cd746d9be5621ad1f6d2cff..e12511c56c09decb3ced08eff2b3890c42e1f5ba 100644
|
| --- a/ash/common/system/chromeos/audio/volume_view.cc
|
| +++ b/ash/common/system/chromeos/audio/volume_view.cc
|
| @@ -256,15 +256,14 @@ void VolumeView::UpdateDeviceTypeAndMore() {
|
| if (!show_more)
|
| return;
|
|
|
| - // Show output device icon if necessary.
|
| - device_type_->SetVisible(false);
|
| + bool target_visibility = false;
|
| if (MaterialDesignController::IsSystemTrayMenuMaterial()) {
|
| const gfx::VectorIcon& device_icon =
|
| audio_delegate_->GetActiveOutputDeviceVectorIcon();
|
| if (!device_icon.is_empty()) {
|
| device_type_->SetImage(
|
| gfx::CreateVectorIcon(device_icon, kMenuIconColor));
|
| - device_type_->SetVisible(true);
|
| + target_visibility = true;
|
| }
|
| } else {
|
| int device_icon = audio_delegate_->GetActiveOutputDeviceIconId();
|
| @@ -272,9 +271,13 @@ void VolumeView::UpdateDeviceTypeAndMore() {
|
| device_type_->SetImage(ui::ResourceBundle::GetSharedInstance()
|
| .GetImageNamed(device_icon)
|
| .ToImageSkia());
|
| - device_type_->SetVisible(true);
|
| + target_visibility = true;
|
| }
|
| }
|
| + if (device_type_->visible() != target_visibility) {
|
| + device_type_->SetVisible(target_visibility);
|
| + device_type_->InvalidateLayout();
|
| + }
|
| }
|
|
|
| void VolumeView::HandleVolumeUp(int level) {
|
|
|