mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:42:44 +00:00 
			
		
		
		
	SoundPlayer: Enable stop button when play button clicked
Previously, if you play a file, then stop, then play again, the stop button will be permanently disabled until you open a file again. The stop button should be enabled whenever a file is loaded. This commit fixes the GUI bug by enabling the stop button whenever the play button is clicked (if a file is currently loaded).
This commit is contained in:
		
							parent
							
								
									e0a2c1544f
								
							
						
					
					
						commit
						17c78be334
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		|  | @ -72,6 +72,7 @@ SoundPlayerWidgetAdvancedView::SoundPlayerWidgetAdvancedView(GUI::Window& window | |||
|         bool paused = this->manager().toggle_pause(); | ||||
|         set_paused(paused); | ||||
|         m_play_button->set_icon(paused ? *m_play_icon : *m_pause_icon); | ||||
|         m_stop_button->set_enabled(has_loaded_file()); | ||||
|     }; | ||||
| 
 | ||||
|     m_stop_button = menubar.add<GUI::Button>(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Nick Miller
						Nick Miller