diff --git a/base/src/main/java/atlantafx/base/controls/CaptionMenuItem.java b/base/src/main/java/atlantafx/base/controls/CaptionMenuItem.java index c7825fc..270aa9d 100644 --- a/base/src/main/java/atlantafx/base/controls/CaptionMenuItem.java +++ b/base/src/main/java/atlantafx/base/controls/CaptionMenuItem.java @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: MIT */ package atlantafx.base.controls; -import atlantafx.base.theme.Styles; import javafx.beans.property.StringProperty; import javafx.scene.control.CustomMenuItem; import javafx.scene.control.Label; @@ -9,7 +8,7 @@ import javafx.scene.control.Label; @SuppressWarnings("unused") public class CaptionMenuItem extends CustomMenuItem { - private final Label title = new Label(); + protected final Label title = new Label(); public CaptionMenuItem() { this(null); @@ -21,7 +20,7 @@ public class CaptionMenuItem extends CustomMenuItem { setTitle(text); setContent(title); setHideOnClick(false); - getStyleClass().add(Styles.TEXT_CAPTION); + getStyleClass().addAll("caption-menu-item"); } public String getTitle() { diff --git a/styles/src/components/_menu.scss b/styles/src/components/_menu.scss index 32d5e39..3231ec6 100755 --- a/styles/src/components/_menu.scss +++ b/styles/src/components/_menu.scss @@ -133,7 +133,7 @@ $separator-padding: map-get(cfg.$separators, "small") !default; -fx-max-width: cfg.$checkbox-mark-size; } -.custom-menu-item.heading { +.caption-menu-item { -fx-padding: cfg.$menu-padding-y cfg.$menu-padding-x cfg.$menu-padding-y cfg.$menu-padding-x; &:hover,