Add subtle text style support
This commit is contained in:
parent
92a4f885ae
commit
8af9bdfc7f
@ -7,8 +7,6 @@ import javafx.scene.Node;
|
||||
@SuppressWarnings("unused")
|
||||
public final class Styles {
|
||||
|
||||
// @formatter:off
|
||||
|
||||
// Colors
|
||||
|
||||
public static final String ACCENT = "accent";
|
||||
@ -73,7 +71,9 @@ public final class Styles {
|
||||
public static final String TEXT_OBLIQUE = "text-oblique";
|
||||
public static final String TEXT_STRIKETHROUGH = "text-strikethrough";
|
||||
public static final String TEXT_UNDERLINED = "text-underlined";
|
||||
|
||||
public static final String TEXT_MUTED = "text-muted";
|
||||
public static final String TEXT_SUBTLE = "text-subtle";
|
||||
|
||||
/**
|
||||
* Initialize a new Styles
|
||||
@ -82,8 +82,6 @@ public final class Styles {
|
||||
// Default constructor
|
||||
}
|
||||
|
||||
// @formatter:on
|
||||
|
||||
public static void toggleStyleClass(Node node, String styleClass) {
|
||||
if (node == null)
|
||||
throw new NullPointerException("Node cannot be null!");
|
||||
|
@ -249,7 +249,9 @@ public class TypographyPage extends AbstractPage {
|
||||
createText("Accent", TEXT, ACCENT),
|
||||
createText("Success", TEXT, SUCCESS),
|
||||
createText("Warning", TEXT, WARNING),
|
||||
createText("Danger", TEXT, DANGER)
|
||||
createText("Danger", TEXT, DANGER),
|
||||
createText("Muted", TEXT, TEXT_MUTED),
|
||||
createText("Subtle", TEXT, TEXT_SUBTLE)
|
||||
);
|
||||
box.setAlignment(Pos.BASELINE_LEFT);
|
||||
|
||||
|
@ -91,11 +91,22 @@ Text {
|
||||
-fx-fill: -color-fg-muted;
|
||||
}
|
||||
.label.text-muted {
|
||||
-fx-text-fill: -color-accent-fg;
|
||||
-fx-text-fill: -color-fg-muted;
|
||||
|
||||
#{cfg.$font-icon-selector} {
|
||||
-fx-icon-color: -color-accent-fg;
|
||||
-fx-fill: -color-accent-fg;
|
||||
-fx-icon-color: -color-fg-muted;
|
||||
-fx-fill: -color-fg-muted;
|
||||
}
|
||||
}
|
||||
.text-subtle {
|
||||
-fx-fill: -color-fg-subtle;
|
||||
}
|
||||
.label.text-subtle {
|
||||
-fx-text-fill: -color-fg-subtle;
|
||||
|
||||
#{cfg.$font-icon-selector} {
|
||||
-fx-icon-color: -color-fg-subtle;
|
||||
-fx-fill: -color-fg-subtle;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user