Skip to content

Commit

Permalink
Fix cyrillic spacing in chat text field
Browse files Browse the repository at this point in the history
Uses the default font now instead of Segoe UI. Smileys seem to work now too.
  • Loading branch information
zapek committed Dec 31, 2024
1 parent fdbdbf7 commit 8204414
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ else if (item.getEventType() == ChatRoomEvent.KEEP_ALIVE.getCode())
else if (item.getEventType() == ChatRoomEvent.PEER_STATUS.getCode())
{
chatRoom.userActivity(user);
sendChatRoomEventToConsumers(item.getRoomId(), CHAT_ROOM_TYPING_NOTIFICATION, user, item.getSenderNickname());
sendChatRoomTypingNotificationToConsumers(item.getRoomId(), user, item.getSenderNickname());
}
}

Expand All @@ -581,6 +581,12 @@ private void sendChatRoomEventToConsumers(long roomId, MessageType messageType,
sendChatRoomEventToConsumers(roomId, messageType, gxsId, nickname, null);
}

private void sendChatRoomTypingNotificationToConsumers(long roomId, GxsId gxsId, String nickname)
{
var chatRoomMessage = new ChatRoomMessage(nickname, gxsId, null);
messageService.sendToConsumers(chatRoomDestination(), CHAT_ROOM_TYPING_NOTIFICATION, roomId, chatRoomMessage);
}

private void sendChatRoomTimeoutToConsumers(long roomId, GxsId gxsId, boolean split)
{
var chatRoomTimeoutEvent = new ChatRoomTimeoutEvent(gxsId, split);
Expand Down
4 changes: 1 addition & 3 deletions ui/src/main/resources/view/windows.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
-fx-font-family: "Consolas";
}

/* this is needed to display emojis before sending them */
.chat-send {
-fx-font-family: "Segoe UI Emoji";
-fx-pref-height: 36px; /* and this is needed otherwise the widget is too small */
-fx-pref-height: 36px; /* this is needed otherwise the widget is too small */
}

0 comments on commit 8204414

Please sign in to comment.