Added display of settings-icon for the settings button

additionally modified margin of elements in ChatScene
This commit is contained in:
delvh
2020-06-26 17:33:32 +02:00
parent bbd5f61486
commit 86e8b4b139
4 changed files with 171 additions and 110 deletions

View File

@ -35,7 +35,7 @@ public final class Startup extends Application {
/**
* The version of this client. Used to verify compatibility with the server.
*
*
* @since Envoy Client v0.1-beta
*/
public static final String VERSION = "0.1-beta";

View File

@ -12,6 +12,7 @@ import javafx.collections.FXCollections;
import javafx.fxml.FXML;
import javafx.scene.control.*;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.image.ImageView;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.paint.Color;
@ -22,9 +23,7 @@ import envoy.client.data.Settings;
import envoy.client.event.MessageCreationEvent;
import envoy.client.net.Client;
import envoy.client.net.WriteProxy;
import envoy.client.ui.ContactListCell;
import envoy.client.ui.MessageListCell;
import envoy.client.ui.SceneContext;
import envoy.client.ui.*;
import envoy.data.*;
import envoy.event.EventBus;
import envoy.event.MessageStatusChange;
@ -90,6 +89,12 @@ public final class ChatScene {
messageList.setCellFactory(listView -> new MessageListCell());
userList.setCellFactory(listView -> new ContactListCell());
try {
settingsButton.setGraphic(new ImageView(IconUtil.load("/icons/settings.png", 16)));
} catch (final IOException e2) {
logger.log(Level.WARNING, "Could not load settings icon", e2);
}
// Listen to received messages
eventBus.register(MessageCreationEvent.class, e -> {
final var message = e.get();