Moved remainingCharsLabel styling from code to CSS
This commit is contained in:
parent
d20d72f6e2
commit
b23ee61506
@ -85,10 +85,6 @@ public final class ChatScene {
|
||||
messageList.setCellFactory(listView -> new MessageListCell());
|
||||
userList.setCellFactory(listView -> new ContactListCell());
|
||||
|
||||
// Unfortunately, remainingChars.setTextFill(...) does not work as it is most
|
||||
// likely overridden by CSS
|
||||
remainingChars.setStyle("-fx-text-fill: #00FF00; -fx-opacity: 1; -fx-background-color: transparent;");
|
||||
|
||||
// Listen to received messages
|
||||
eventBus.register(MessageCreationEvent.class, e -> {
|
||||
final var message = e.get();
|
||||
|
@ -6,3 +6,9 @@
|
||||
-fx-scale-x: 1.05;
|
||||
-fx-scale-y: 1.05;
|
||||
}
|
||||
|
||||
#remainingCharsLabel {
|
||||
-fx-text-fill: #00FF00;
|
||||
-fx-opacity: 1;
|
||||
-fx-background-color: transparent;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@
|
||||
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||
</GridPane.margin>
|
||||
</Button>
|
||||
<Label fx:id="remainingChars" disable="true" ellipsisString="" maxHeight="30.0" maxWidth="180.0" prefHeight="30.0" prefWidth="180.0" text="remaining chars: 0/x" textFill="LIME" textOverrun="LEADING_WORD_ELLIPSIS" visible="false" GridPane.columnIndex="1" GridPane.rowIndex="2">
|
||||
<Label id="remainingCharsLabel" fx:id="remainingChars" ellipsisString="" maxHeight="30.0" maxWidth="180.0" prefHeight="30.0" prefWidth="180.0" text="remaining chars: 0/x" textFill="LIME" textOverrun="LEADING_WORD_ELLIPSIS" visible="false" GridPane.columnIndex="1" GridPane.rowIndex="2">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||
</GridPane.margin>
|
||||
|
Reference in New Issue
Block a user