Chromium Code Reviews| 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..22132d96465da226d8a9f44ae993a181dcd03c4d 100644 |
| --- a/ash/common/system/chromeos/audio/volume_view.cc |
| +++ b/ash/common/system/chromeos/audio/volume_view.cc |
| @@ -256,6 +256,8 @@ void VolumeView::UpdateDeviceTypeAndMore() { |
| if (!show_more) |
| return; |
| + bool was_visible = device_type_->visible(); |
| + |
| // Show output device icon if necessary. |
| device_type_->SetVisible(false); |
| if (MaterialDesignController::IsSystemTrayMenuMaterial()) { |
| @@ -275,6 +277,8 @@ void VolumeView::UpdateDeviceTypeAndMore() { |
| device_type_->SetVisible(true); |
| } |
| } |
| + if (device_type_->visible() != was_visible) |
| + device_type_->InvalidateLayout(); |
|
sadrul
2017/02/02 21:25:34
Setting the visibility can trigger a repaint. For
mohsen
2017/02/02 21:35:31
Sure. That makes a lot of sense. Done.
|
| } |
| void VolumeView::HandleVolumeUp(int level) { |