Skip to content

Commit

Permalink
Improve offerbook chat window header title
Browse files Browse the repository at this point in the history
Temporarily disable the channel icon.
  • Loading branch information
axpoems committed Dec 19, 2023
1 parent ebd211a commit 8018101
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,21 @@ protected void configTitleHBox() {
titleHBox.setMinHeight(HEADER_HEIGHT);
titleHBox.setMaxHeight(HEADER_HEIGHT);

channelTitle.setId("chat-messages-headline");
channelTitle.getStyleClass().add("chat-header-title");
channelTitle.setCursor(Cursor.HAND);
channelTitle.setMinWidth(128);
channelTitle.setMinWidth(81);

marketSelectorIcon = Icons.getIcon(AwesomeIcon.CHEVRON_DOWN, "12");
marketSelectorIcon.getStyleClass().add("market-selector-icon");
marketSelectorIcon.setCursor(Cursor.HAND);
marketSelectorIcon.setPadding(new Insets(7, 5, 7, 0));
marketSelectorIcon.setPadding(new Insets(0, 15, 0, 7));
marketSelectorIcon.setTooltip(new BisqTooltip(Res.get("bisqEasy.offerbook.selectMarket"), true));

channelDescription.getStyleClass().addAll("chat-header-description");

HBox headerTitle = new HBox(15, channelTitle, marketSelectorIcon, channelDescription);
HBox headerTitle = new HBox(channelTitle, marketSelectorIcon, channelDescription);
headerTitle.setAlignment(Pos.BASELINE_LEFT);
headerTitle.setPadding(new Insets(7, 0, 0, 0));
HBox.setHgrow(headerTitle, Priority.ALWAYS);

searchBox.setMaxWidth(200);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public abstract class ChatView extends NavigationView<ScrollPane, ChatModel, Cha
protected final HBox containerHBox = new HBox();
protected final Pane channelSidebar, chatMessagesComponent;
protected Pane chatUserOverviewRoot;
protected Subscription channelIconPin, chatUserOverviewRootSubscription;
protected Subscription /*channelIconPin,*/ chatUserOverviewRootSubscription;
protected final SearchBox searchBox = new SearchBox();

public ChatView(ChatModel model,
Expand Down Expand Up @@ -101,16 +101,16 @@ protected void onViewAttached() {
}
});

channelIconPin = EasyBind.subscribe(model.getChannelIconNode(), node -> {
if (node != null) {
channelTitle.setGraphic(node);
channelTitle.setGraphicTextGap(10);
node.setStyle("-fx-cursor: hand;");
node.setOnMouseClicked(e -> controller.onToggleChannelInfo());
} else {
channelTitle.setGraphic(null);
}
});
// channelIconPin = EasyBind.subscribe(model.getChannelIconNode(), node -> {
// if (node != null) {
// channelTitle.setGraphic(node);
// channelTitle.setGraphicTextGap(10);
// node.setStyle("-fx-cursor: hand;");
// node.setOnMouseClicked(e -> controller.onToggleChannelInfo());
// } else {
// channelTitle.setGraphic(null);
// }
// });
}

@Override
Expand All @@ -131,6 +131,6 @@ protected void onViewDetached() {
}

chatUserOverviewRootSubscription.unsubscribe();
channelIconPin.unsubscribe();
// channelIconPin.unsubscribe();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected void configTitleHBox() {

HBox headerTitle = new HBox(20, channelTitle, channelDescription);
headerTitle.setAlignment(Pos.BASELINE_LEFT);
headerTitle.setPadding(new Insets(2, 0, 0, 0));
headerTitle.setPadding(new Insets(7, 0, 0, 0));
HBox.setHgrow(headerTitle, Priority.ALWAYS);

channelTitle.getStyleClass().add("chat-header-title");
Expand Down
4 changes: 4 additions & 0 deletions apps/desktop/desktop/src/main/resources/css/bisq_easy.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@
-fx-text-fill: -fx-light-text-color !important;
}

.market-selector-icon {
-fx-text-fill: -bisq2-green;
}

.create-offer-button {
-fx-background-color: -fx-default-button;
-fx-text-fill: -fx-light-text-color;
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/desktop/src/main/resources/css/chat.css
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@

.chat-header-title {
-fx-text-fill: -bisq2-green;
-fx-font-size: 1.53em;
-fx-font-size: 1.4em;
-fx-font-family: "IBM Plex Sans Light";
}

Expand Down

0 comments on commit 8018101

Please sign in to comment.