From 0a6986c3c548795b7abca080c2bea0e17f153fc7 Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Fri, 1 Mar 2024 19:45:50 +0100 Subject: [PATCH 1/4] Fix PeerOfferMessage user icon size --- .../chatMessages/messages/BisqEasy/PeerOfferMessage.java | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BisqEasy/PeerOfferMessage.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BisqEasy/PeerOfferMessage.java index 89e4ab0cc5..1b8d4ac912 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BisqEasy/PeerOfferMessage.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BisqEasy/PeerOfferMessage.java @@ -54,6 +54,7 @@ protected void setUpPeerMessage() { super.setUpPeerMessage(); // User profile icon + userProfileIcon.setSize(60); userProfileIconVbox.setAlignment(Pos.CENTER_LEFT); HBox.setMargin(userProfileIconVbox, new Insets(-5, 0, -5, 0)); From 41ec3da96d03eb5531b8e3a70866e0aa01ab4ddd Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Fri, 1 Mar 2024 22:10:45 +0100 Subject: [PATCH 2/4] Improve styles of peerOfferMessage --- .../chatMessages/ChatMessagesComponent.java | 2 +- .../messages/BisqEasy/PeerOfferMessage.java | 30 +++++++++---------- .../chatMessages/messages/BubbleMessage.java | 2 +- .../desktop/src/main/resources/css/chat.css | 27 ++++++++++++++++- .../desktop/src/main/resources/css/text.css | 4 +++ 5 files changed, 47 insertions(+), 18 deletions(-) diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/ChatMessagesComponent.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/ChatMessagesComponent.java index 6f94c9d201..a352c173e8 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/ChatMessagesComponent.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/ChatMessagesComponent.java @@ -493,7 +493,7 @@ private VBox createAndGetBottomBar(UserProfileSelection userProfileSelection) { private HBox createAndGetSendMessageBox() { inputField.setPromptText(Res.get("chat.message.input.prompt")); - inputField.getStyleClass().addAll("chat-input-field", "normal-text"); + inputField.getStyleClass().addAll("chat-input-field", "medium-text"); inputField.setPadding(new Insets(5, 0, 5, 5)); HBox.setMargin(inputField, new Insets(0, 0, 1.5, 0)); HBox.setHgrow(inputField, Priority.ALWAYS); diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BisqEasy/PeerOfferMessage.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BisqEasy/PeerOfferMessage.java index 1b8d4ac912..e30d986475 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BisqEasy/PeerOfferMessage.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BisqEasy/PeerOfferMessage.java @@ -51,37 +51,37 @@ public PeerOfferMessage(ChatMessageListItem controller.onTakeOffer(bisqEasyOfferbookMessage)); takeOfferButton.setDefaultButton(!item.isOfferAlreadyTaken()); - takeOfferButton.setMinWidth(Control.USE_PREF_SIZE); - HBox.setMargin(takeOfferButton, new Insets(0, 10, 0, 0)); + takeOfferButton.getStyleClass().add("take-offer-button"); + + HBox hBox = new HBox(15, userProfileIconVbox, reputationVBox, message); + hBox.setAlignment(Pos.CENTER); + message.getStyleClass().add("chat-peer-offer-message"); + + VBox vBox = new VBox(5, hBox, takeOfferButton); + vBox.setAlignment(Pos.CENTER_RIGHT); // Message background - messageBgHBox.getChildren().setAll(userProfileIconVbox, messageVBox, Spacer.fillHBox(), reputationVBox, takeOfferButton); + messageBgHBox.getStyleClass().add("chat-peer-offer-message-bg"); + messageBgHBox.getChildren().setAll(vBox); + messageBgHBox.setAlignment(Pos.CENTER_LEFT); + messageBgHBox.setMaxWidth(Control.USE_PREF_SIZE); } @Override diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BubbleMessage.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BubbleMessage.java index ca2705170c..acd2d8b35b 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BubbleMessage.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BubbleMessage.java @@ -182,7 +182,7 @@ private Label createAndGetMessage() { label.maxWidthProperty().unbind(); label.setWrapText(true); label.setPadding(new Insets(10)); - label.getStyleClass().addAll("text-fill-white", "normal-text", "font-default"); + label.getStyleClass().addAll("text-fill-white", "medium-text", "font-default"); label.setText(item.getMessage()); return label; } diff --git a/apps/desktop/desktop/src/main/resources/css/chat.css b/apps/desktop/desktop/src/main/resources/css/chat.css index 4a59e751ac..f318df99bd 100644 --- a/apps/desktop/desktop/src/main/resources/css/chat.css +++ b/apps/desktop/desktop/src/main/resources/css/chat.css @@ -160,11 +160,36 @@ -fx-background-radius: 8; } -.chat-message-bg-peer-message { +/* Peer Message */ +.chat-message-bg-peer-message, +.chat-peer-offer-message-bg { -fx-background-color: -bisq-dark-grey-40; -fx-background-radius: 8; } +/* Peer Offer Message */ +.chat-peer-offer-message-bg { + -fx-padding: 30 30 20 20; +} + +.chat-peer-offer-message-bg .reputation .label { + -fx-font-size: 0.9em; +} + +.chat-peer-offer-message { + -fx-padding: 0 0 0 7; + -fx-line-spacing: 10px; +} + +.chat-peer-offer-message-bg .take-offer-button { + -fx-padding: 5 30 5 30; +} +/* ... */ + +.chat-peer-offer-message-bg .take-offer-button .text { + -fx-font-size: 0.8em; +} + .create-offer-message-my-offer { -fx-background-color: -bisq-dark-grey-10; -fx-background-radius: 8; diff --git a/apps/desktop/desktop/src/main/resources/css/text.css b/apps/desktop/desktop/src/main/resources/css/text.css index 5576166c5f..324115b02d 100644 --- a/apps/desktop/desktop/src/main/resources/css/text.css +++ b/apps/desktop/desktop/src/main/resources/css/text.css @@ -12,6 +12,10 @@ -fx-font-size: 0.769em; } +.medium-text { + -fx-font-size: 1.05em !important; +} + .normal-text { -fx-font-size: 1.1em !important; } From b6fd5356e4a1fcb28d55d0bd3eb3b4d5eb225cc8 Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Fri, 1 Mar 2024 22:43:53 +0100 Subject: [PATCH 3/4] Improve styles of myOfferMessage, change colour of myMessages --- .../messages/BisqEasy/MyOfferMessage.java | 29 +++++++++-------- .../messages/BisqEasy/PeerOfferMessage.java | 9 +++--- .../desktop/src/main/resources/css/chat.css | 31 +++++++++++++------ .../desktop/src/main/resources/css/text.css | 2 +- 4 files changed, 42 insertions(+), 29 deletions(-) diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BisqEasy/MyOfferMessage.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BisqEasy/MyOfferMessage.java index 9b4c7cc2ef..b1e023bb34 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BisqEasy/MyOfferMessage.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BisqEasy/MyOfferMessage.java @@ -29,6 +29,7 @@ import de.jensd.fx.fontawesome.AwesomeIcon; import javafx.geometry.Insets; import javafx.geometry.Pos; +import javafx.scene.control.Control; import javafx.scene.control.Label; import javafx.scene.control.ListView; import javafx.scene.layout.HBox; @@ -44,32 +45,30 @@ public MyOfferMessage(ChatMessageListItem Date: Fri, 1 Mar 2024 22:55:45 +0100 Subject: [PATCH 4/4] Add constant field to define user icone size in offer messages --- .../chatMessages/messages/BisqEasy/MyOfferMessage.java | 4 ++-- .../chatMessages/messages/BisqEasy/PeerOfferMessage.java | 2 +- .../components/chatMessages/messages/BubbleMessage.java | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BisqEasy/MyOfferMessage.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BisqEasy/MyOfferMessage.java index b1e023bb34..6352baa755 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BisqEasy/MyOfferMessage.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/components/chatMessages/messages/BisqEasy/MyOfferMessage.java @@ -48,7 +48,7 @@ public MyOfferMessage(ChatMessageListItem> item; protected final ListView>> list;