mirror of
				https://github.com/Rafostar/clapper.git
				synced 2025-10-31 02:15:36 +01: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)); | ||||
|         this.volumeButton.add_controller(scrollController); | ||||
|  | ||||
|         let lastVolume = settings.get_double('volume-last'); | ||||
|         let cubicVolume = Misc.getCubicValue(lastVolume); | ||||
|         this.volumeScale.set_value(cubicVolume); | ||||
|         let initialVolume = (settings.get_string('volume-initial') === 'custom') | ||||
|             ? settings.get_int('volume-value') / 100 | ||||
|             : Misc.getCubicValue(settings.get_double('volume-last')); | ||||
|  | ||||
|         this.volumeScale.set_value(initialVolume); | ||||
|     } | ||||
|  | ||||
|     _onUnfullscreenClicked(button) | ||||
|   | ||||
| @@ -359,8 +359,7 @@ class ClapperPlayer extends PlayerBase | ||||
|  | ||||
|         if(!this.doneStartup) { | ||||
|             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')) { | ||||
|                 let root = player.widget.get_root(); | ||||
|                 let clapperWidget = root.get_child(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user