Adjusted message rendering
This commit is contained in:
parent
49ecba6c23
commit
5258a7dc12
@ -317,7 +317,7 @@ public final class ChatScene implements Restorable {
|
||||
recipientProfilePic.setClip(clip);
|
||||
|
||||
messageSearchButton.setVisible(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -36,7 +36,7 @@ import envoy.util.EnvoyLog;
|
||||
*
|
||||
* @author Leon Hofmeister
|
||||
* @author Maximilian Käfer
|
||||
* @since Envoy Client v0.2-beta
|
||||
* @since Envoy Client v0.1-beta
|
||||
*/
|
||||
public class MessageControl extends Label {
|
||||
|
||||
|
@ -30,8 +30,10 @@ public final class MessageListCell extends AbstractListCell<Message, MessageCont
|
||||
final var control = new MessageControl(message);
|
||||
listView.widthProperty()
|
||||
.addListener((observable, oldValue, newValue) -> {
|
||||
int padding = Math.min(100, newValue.intValue() / 10);
|
||||
setPadding(new Insets(0, padding, 0, padding));
|
||||
int padding = 0;
|
||||
if (newValue.intValue() > 1020) padding = (newValue.intValue() - 1000) / 2;
|
||||
else padding = 10;
|
||||
setPadding(new Insets(0, padding, 6, padding));
|
||||
});
|
||||
if (control.isOwnMessage()) setAlignment(Pos.CENTER_RIGHT);
|
||||
else setAlignment(Pos.CENTER_LEFT);
|
||||
|
Reference in New Issue
Block a user