mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
Apply custom initial volume on realize
This commit is contained in:
8
clapper_src/controls.js
vendored
8
clapper_src/controls.js
vendored
@@ -370,9 +370,11 @@ class ClapperControls extends Gtk.Box
|
|||||||
scrollController.connect('scroll', player._onScroll.bind(player));
|
scrollController.connect('scroll', player._onScroll.bind(player));
|
||||||
this.volumeButton.add_controller(scrollController);
|
this.volumeButton.add_controller(scrollController);
|
||||||
|
|
||||||
let lastVolume = settings.get_double('volume-last');
|
let initialVolume = (settings.get_string('volume-initial') === 'custom')
|
||||||
let cubicVolume = Misc.getCubicValue(lastVolume);
|
? settings.get_int('volume-value') / 100
|
||||||
this.volumeScale.set_value(cubicVolume);
|
: Misc.getCubicValue(settings.get_double('volume-last'));
|
||||||
|
|
||||||
|
this.volumeScale.set_value(initialVolume);
|
||||||
}
|
}
|
||||||
|
|
||||||
_onUnfullscreenClicked(button)
|
_onUnfullscreenClicked(button)
|
||||||
|
@@ -359,8 +359,7 @@ class ClapperPlayer extends PlayerBase
|
|||||||
|
|
||||||
if(!this.doneStartup) {
|
if(!this.doneStartup) {
|
||||||
this.doneStartup = true;
|
this.doneStartup = true;
|
||||||
if(settings.get_string('volume-initial') === 'custom')
|
|
||||||
this.set_volume(settings.get_int('volume-value') / 100);
|
|
||||||
if(settings.get_boolean('fullscreen-auto')) {
|
if(settings.get_boolean('fullscreen-auto')) {
|
||||||
let root = player.widget.get_root();
|
let root = player.widget.get_root();
|
||||||
let clapperWidget = root.get_child();
|
let clapperWidget = root.get_child();
|
||||||
|
Reference in New Issue
Block a user