Skip to content

Commit

Permalink
Add title inside notifications settings menu
Browse files Browse the repository at this point in the history
  • Loading branch information
axpoems committed Sep 14, 2024
1 parent cb2f514 commit 68a4e79
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import bisq.desktop.common.view.NavigationView;
import bisq.desktop.components.controls.DropdownBisqMenuItem;
import bisq.desktop.components.controls.DropdownMenu;
import bisq.desktop.components.controls.DropdownTitleMenuItem;
import bisq.desktop.components.controls.SearchBox;
import bisq.i18n.Res;
import javafx.css.PseudoClass;
Expand Down Expand Up @@ -182,6 +183,7 @@ private void setUpEllipsisMenu() {
}

private void setupNotificationsSettingMenu() {
DropdownTitleMenuItem title = new DropdownTitleMenuItem(Res.get("chat.notificationsSettingsMenu.title"));
globalDefault = new NotificationSettingMenuItem("check-white", "check-white",
Res.get("chat.notificationsSettingsMenu.globalDefault"), ChatChannelNotificationType.GLOBAL_DEFAULT);
all = new NotificationSettingMenuItem("check-white", "check-white",
Expand All @@ -190,7 +192,8 @@ private void setupNotificationsSettingMenu() {
Res.get("chat.notificationsSettingsMenu.mention"), ChatChannelNotificationType.MENTION);
off = new NotificationSettingMenuItem("check-white", "check-white",
Res.get("chat.notificationsSettingsMenu.off"), ChatChannelNotificationType.OFF);
notificationsSettingsMenu.addMenuItems(globalDefault, all, mention, off);
notificationsSettingsMenu.getStyleClass().add("notifications-settings-menu");
notificationsSettingsMenu.addMenuItems(title, globalDefault, all, mention, off);
notificationsSettingsMenu.setTooltip(Res.get("chat.notificationsSettingsMenu.tooltip"));
}

Expand Down
4 changes: 4 additions & 0 deletions apps/desktop/desktop/src/main/resources/css/chat.css
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,10 @@
-fx-background-color: -bisq-dark-grey-20;
}

.notifications-settings-menu .dropdown-menu-popup {
-fx-padding: 18 8 8 8 !important;
}


/*******************************************************************************
* Header *
Expand Down
1 change: 1 addition & 0 deletions i18n/src/main/resources/chat.properties
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ chat.ellipsisMenu.chatRules=Chat rules
chat.ellipsisMenu.channelInfo=Channel info
chat.ellipsisMenu.tradeGuide=Trade guide

chat.notificationsSettingsMenu.title=Notification options:
chat.notificationsSettingsMenu.tooltip=Notification options
chat.notificationsSettingsMenu.globalDefault=Use default
chat.notificationsSettingsMenu.all=All messages
Expand Down

0 comments on commit 68a4e79

Please sign in to comment.