Added multiple (recording) icons and change them on recording
This commit is contained in:
		@@ -111,6 +111,7 @@ public final class ChatScene implements Restorable {
 | 
			
		||||
		userList.setCellFactory(ContactListCellFactory::new);
 | 
			
		||||
 | 
			
		||||
		settingsButton.setGraphic(new ImageView(IconUtil.loadDefault("settings", 16)));
 | 
			
		||||
		voiceButton.setGraphic(new ImageView(IconUtil.loadDefaultThemeSensitive("", 24)));
 | 
			
		||||
 | 
			
		||||
		// Listen to received messages
 | 
			
		||||
		eventBus.register(MessageCreationEvent.class, e -> {
 | 
			
		||||
@@ -262,13 +263,17 @@ public final class ChatScene implements Restorable {
 | 
			
		||||
			try {
 | 
			
		||||
				if (!recording) {
 | 
			
		||||
					recording = true;
 | 
			
		||||
					Platform.runLater(() -> voiceButton.setText("Recording..."));
 | 
			
		||||
					Platform.runLater(() -> {
 | 
			
		||||
						voiceButton.setText("Recording");
 | 
			
		||||
						voiceButton.setGraphic(new ImageView(IconUtil.loadDefault("microphone_recording", 24)));
 | 
			
		||||
					});
 | 
			
		||||
					recorder.start();
 | 
			
		||||
				} else {
 | 
			
		||||
					pendingAttachment	= new Attachment(recorder.finish(), AttachmentType.VOICE);
 | 
			
		||||
					recording			= false;
 | 
			
		||||
					Platform.runLater(() -> {
 | 
			
		||||
						voiceButton.setText("Record Voice Message");
 | 
			
		||||
						voiceButton.setGraphic(new ImageView(IconUtil.loadDefaultThemeSensitive("microphone_", 24)));
 | 
			
		||||
						voiceButton.setText(null);
 | 
			
		||||
						checkPostConditions(false);
 | 
			
		||||
						attachmentView.setImage(IconUtil.loadDefaultThemeSensitive("attachment_present_", 20));
 | 
			
		||||
						attachmentView.setVisible(true);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								src/main/resources/icons/forward_white.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/main/resources/icons/forward_white.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 25 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								src/main/resources/icons/microphone_black.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/main/resources/icons/microphone_black.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 18 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								src/main/resources/icons/microphone_recording.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/main/resources/icons/microphone_recording.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 20 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								src/main/resources/icons/microphone_white.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/main/resources/icons/microphone_white.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 21 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								src/main/resources/icons/settings_black.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/main/resources/icons/settings_black.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 3.4 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								src/main/resources/icons/settings_white.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/main/resources/icons/settings_white.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 28 KiB  | 
		Reference in New Issue
	
	Block a user