diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js index bd49cc3ae..79950458d 100644 --- a/js/ui/status/volume.js +++ b/js/ui/status/volume.js @@ -204,6 +204,7 @@ const StreamSlider = GObject.registerClass({ let muted = this._stream.is_muted; this._changeSlider(muted ? 0 : this._stream.volume / this._control.get_vol_max_norm()); + this._updateIcon(); this.emit('stream-updated'); } @@ -217,6 +218,10 @@ const StreamSlider = GObject.registerClass({ this._updateVolume(); } + _updateIcon() { + this.iconName = this.getIcon(); + } + getIcon() { if (!this._stream) return null; @@ -308,9 +313,13 @@ class OutputStreamSlider extends StreamSlider { return; this._hasHeadphones = hasHeadphones; + this._updateIcon(); + } + + _updateIcon() { this.iconName = this._hasHeadphones ? 'audio-headphones-symbolic' - : 'audio-speakers-symbolic'; + : this.getIcon(); } });