Fix caption menu item hover color

This commit is contained in:
mkpaz 2022-09-28 15:13:57 +04:00
parent 455dad1076
commit bb4189aa7d
2 changed files with 3 additions and 4 deletions

@ -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() {

@ -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,