diff --git a/apps/client/src/stylesheets/calendar.css b/apps/client/src/stylesheets/calendar.css index 48f01a9b8..314439846 100644 --- a/apps/client/src/stylesheets/calendar.css +++ b/apps/client/src/stylesheets/calendar.css @@ -4,6 +4,10 @@ box-sizing: border-box; } +.dropdown-menu:not(.static).calendar-dropdown-menu { + padding: 0 !important; +} + .calendar-dropdown-widget { margin: 0 auto; overflow: hidden; diff --git a/apps/client/src/stylesheets/theme-next/shell.css b/apps/client/src/stylesheets/theme-next/shell.css index 19ac27477..83517e9ad 100644 --- a/apps/client/src/stylesheets/theme-next/shell.css +++ b/apps/client/src/stylesheets/theme-next/shell.css @@ -345,7 +345,7 @@ body[dir=ltr] #launcher-container { */ .calendar-dropdown-widget { - padding: 12px; + padding: 18px; color: var(--calendar-color); user-select: none; } diff --git a/apps/client/src/widgets/buttons/calendar.ts b/apps/client/src/widgets/buttons/calendar.ts index 548e9fd11..f03a4da3a 100644 --- a/apps/client/src/widgets/buttons/calendar.ts +++ b/apps/client/src/widgets/buttons/calendar.ts @@ -110,7 +110,7 @@ export default class CalendarWidget extends RightDropdownButtonWidget { private weekNotes: string[] = []; constructor(title: string = "", icon: string = "") { - super(title, icon, DROPDOWN_TPL); + super(title, icon, DROPDOWN_TPL, "calendar-dropdown-menu"); } doRender() { diff --git a/apps/client/src/widgets/buttons/right_dropdown_button.ts b/apps/client/src/widgets/buttons/right_dropdown_button.ts index 7c43f14af..4b3505bc9 100644 --- a/apps/client/src/widgets/buttons/right_dropdown_button.ts +++ b/apps/client/src/widgets/buttons/right_dropdown_button.ts @@ -24,14 +24,16 @@ export default class RightDropdownButtonWidget extends BasicWidget { protected dropdown!: Dropdown; protected $tooltip!: JQuery; protected tooltip!: Tooltip; + private dropdownClass?: string; public $dropdownContent!: JQuery; - constructor(title: string, iconClass: string, dropdownTpl: string) { + constructor(title: string, iconClass: string, dropdownTpl: string, dropdownClass?: string) { super(); this.iconClass = iconClass; this.title = title; this.dropdownTpl = dropdownTpl; + this.dropdownClass = dropdownClass; this.settings = { titlePlacement: "right" @@ -41,6 +43,9 @@ export default class RightDropdownButtonWidget extends BasicWidget { doRender() { this.$widget = $(TPL); this.$dropdownMenu = this.$widget.find(".dropdown-menu"); + if (this.dropdownClass) { + this.$dropdownMenu.addClass(this.dropdownClass); + } this.dropdown = Dropdown.getOrCreateInstance(this.$widget.find("[data-bs-toggle='dropdown']")[0], { popperConfig: { placement: this.settings.titlePlacement,