Fix caption menu item hover color
This commit is contained in:
parent
455dad1076
commit
bb4189aa7d
@ -1,7 +1,6 @@
|
|||||||
/* SPDX-License-Identifier: MIT */
|
/* SPDX-License-Identifier: MIT */
|
||||||
package atlantafx.base.controls;
|
package atlantafx.base.controls;
|
||||||
|
|
||||||
import atlantafx.base.theme.Styles;
|
|
||||||
import javafx.beans.property.StringProperty;
|
import javafx.beans.property.StringProperty;
|
||||||
import javafx.scene.control.CustomMenuItem;
|
import javafx.scene.control.CustomMenuItem;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
@ -9,7 +8,7 @@ import javafx.scene.control.Label;
|
|||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public class CaptionMenuItem extends CustomMenuItem {
|
public class CaptionMenuItem extends CustomMenuItem {
|
||||||
|
|
||||||
private final Label title = new Label();
|
protected final Label title = new Label();
|
||||||
|
|
||||||
public CaptionMenuItem() {
|
public CaptionMenuItem() {
|
||||||
this(null);
|
this(null);
|
||||||
@ -21,7 +20,7 @@ public class CaptionMenuItem extends CustomMenuItem {
|
|||||||
setTitle(text);
|
setTitle(text);
|
||||||
setContent(title);
|
setContent(title);
|
||||||
setHideOnClick(false);
|
setHideOnClick(false);
|
||||||
getStyleClass().add(Styles.TEXT_CAPTION);
|
getStyleClass().addAll("caption-menu-item");
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
|
@ -133,7 +133,7 @@ $separator-padding: map-get(cfg.$separators, "small") !default;
|
|||||||
-fx-max-width: cfg.$checkbox-mark-size;
|
-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;
|
-fx-padding: cfg.$menu-padding-y cfg.$menu-padding-x cfg.$menu-padding-y cfg.$menu-padding-x;
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
|
Loading…
Reference in New Issue
Block a user