mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 16:31:58 +02:00
API: operate on cubic volume scale
Instead converting volume inside GJS, simplify things by making API operate on cubic volume scale.
This commit is contained in:
@@ -530,7 +530,7 @@ class ClapperWidget extends Gtk.Grid
|
||||
|
||||
_onPlayerVolumeChanged(player)
|
||||
{
|
||||
const volume = player.get_volume();
|
||||
const volume = player.volume;
|
||||
|
||||
/* FIXME: This check should not be needed, GstPlayer should not
|
||||
* emit 'volume-changed' with the same values, but it does. */
|
||||
@@ -540,8 +540,7 @@ class ClapperWidget extends Gtk.Grid
|
||||
/* Once above is fixed in GstPlayer, remove this var too */
|
||||
this.controls.currentVolume = volume;
|
||||
|
||||
const cubicVolume = Misc.getCubicValue(volume);
|
||||
this.controls._updateVolumeButtonIcon(cubicVolume);
|
||||
this.controls._updateVolumeButtonIcon(volume);
|
||||
}
|
||||
|
||||
_onStateNotify(toplevel)
|
||||
|
Reference in New Issue
Block a user