Make volume restore more reliable

Instead setting value to volume scale, set value to the player itself. Scale will be updated due to bidirectional binded property. This fixes cases where slider did not emit value-changed notify as it was being set to the same value as initial one.
This commit is contained in:
Rafał Dzięgiel
2021-02-24 14:26:34 +01:00
parent 0a8e25d27b
commit 0fe1cf5f0d

2
src/controls.js vendored
View File

@@ -473,7 +473,7 @@ class ClapperControls extends Gtk.Box
? settings.get_int('volume-value') / 100 ? settings.get_int('volume-value') / 100
: settings.get_double('volume-last'); : settings.get_double('volume-last');
this.volumeScale.set_value(initialVolume); clapperWidget.player.volume = initialVolume;
} }
_onPlayerResize(width, height) _onPlayerResize(width, height)