Message Text Line-Wrap works properly now
This commit is contained in:
parent
5258a7dc12
commit
8837273982
@ -10,6 +10,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.scene.control.ContextMenu;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.MenuItem;
|
||||
@ -107,6 +108,7 @@ public class MessageControl extends Label {
|
||||
}
|
||||
// Creating the textLabel
|
||||
final var textLabel = new Label(message.getText());
|
||||
textLabel.setMaxWidth(430);
|
||||
textLabel.setWrapText(true);
|
||||
vbox.getChildren().add(textLabel);
|
||||
// Setting the message status icon and background color
|
||||
@ -116,6 +118,7 @@ public class MessageControl extends Label {
|
||||
vbox.getChildren().add(statusIcon);
|
||||
getStyleClass().add("own-message");
|
||||
ownMessage = true;
|
||||
hbox.setAlignment(Pos.CENTER_RIGHT);
|
||||
} else {
|
||||
getStyleClass().add("received-message");
|
||||
ownMessage = false;
|
||||
|
Reference in New Issue
Block a user