Update style

This commit is contained in:
Manfred Karrer 2014-09-15 02:42:21 +02:00
parent 7dc8d66614
commit 6f05579c4b
2 changed files with 11 additions and 21 deletions

View file

@ -465,22 +465,8 @@ textfield */
/* TitledSeparator */ /* TitledSeparator */
#titled-separator-label {
-fx-font-weight: bold;
-fx-font-size: 14;
-fx-text-fill: -bs-dark-grey;
-fx-background-color: #f4f4f4;
}
#titled-separator-label-active {
-fx-font-weight: bold;
-fx-font-size: 14;
-fx-text-fill: -bs-theme-color;
-fx-background-color: #f4f4f4;
}
#titled-separator:horizontal .line { #titled-separator:horizontal .line {
-fx-border-color: #cccccc transparent #999999 transparent; -fx-border-color: transparent #f4f4f4 transparent #f4f4f4;
-fx-background-color: transparent;
-fx-border-width: 10px;
} }
#titled-separator-active:horizontal .line {
-fx-border-color: #dddddd transparent derive(-bs-theme-color, 50%) transparent;
}

View file

@ -43,6 +43,9 @@ public class TitledSeparator extends Pane {
separator = new Separator(); separator = new Separator();
separator.prefWidthProperty().bind(widthProperty()); separator.prefWidthProperty().bind(widthProperty());
separator.setLayoutX(0);
separator.setLayoutY(6);
separator.setId("titled-separator");
label = new Label(); label = new Label();
label.textProperty().bind(text); label.textProperty().bind(text);
@ -51,16 +54,17 @@ public class TitledSeparator extends Pane {
label.setPadding(new Insets(0, 7, 0, 5)); label.setPadding(new Insets(0, 7, 0, 5));
setActive(); setActive();
getChildren().addAll(separator, label); getChildren().addAll(separator, label);
} }
public void setInactive() { public void setInactive() {
separator.setId("titled-separator"); setId("titled-group-bg");
label.setId("titled-separator-label"); label.setId("titled-group-bg-label");
} }
public void setActive() { public void setActive() {
separator.setId("titled-separator-active"); setId("titled-group-bg-active");
label.setId("titled-separator-label-active"); label.setId("titled-group-bg-label-active");
} }
public String getText() { public String getText() {