diff --git a/sampler/src/main/java/atlantafx/sampler/layout/MainLayer.java b/sampler/src/main/java/atlantafx/sampler/layout/MainLayer.java index 0eb1679..357a497 100644 --- a/sampler/src/main/java/atlantafx/sampler/layout/MainLayer.java +++ b/sampler/src/main/java/atlantafx/sampler/layout/MainLayer.java @@ -108,7 +108,7 @@ class MainLayer extends BorderPane { // startup, no prev page, no animation if (getScene() == null) { - subLayerPane.getChildren().setAll(nextPage.getView()); + subLayerPane.getChildren().add(nextPage.getView()); return; } @@ -118,7 +118,7 @@ class MainLayer extends BorderPane { prevPage.reset(); // animate switching between pages - subLayerPane.getChildren().setAll(nextPage.getView()); + subLayerPane.getChildren().add(nextPage.getView()); var transition = new FadeTransition(Duration.millis(PAGE_TRANSITION_DURATION), nextPage.getView()); transition.setFromValue(0.0); transition.setToValue(1.0); diff --git a/sampler/src/main/java/atlantafx/sampler/page/general/ContrastChecker.java b/sampler/src/main/java/atlantafx/sampler/page/general/ContrastChecker.java index 230d29a..d3d4d97 100644 --- a/sampler/src/main/java/atlantafx/sampler/page/general/ContrastChecker.java +++ b/sampler/src/main/java/atlantafx/sampler/page/general/ContrastChecker.java @@ -269,9 +269,10 @@ class ContrastChecker extends GridPane { getFgColorName(), fgColor.getColor() ))); - var controlsBox = new HBox(20, new Spacer(), flattenBtn, applyBtn); - controlsBox.setAlignment(Pos.CENTER_LEFT); - controlsBox.setPadding(new Insets(10, 0, 0, 0)); + var actionsBox = new HBox(20, new Spacer(), flattenBtn, applyBtn); + actionsBox.getStyleClass().add("actions"); + actionsBox.setAlignment(Pos.CENTER_LEFT); + actionsBox.setPadding(new Insets(10, 0, 0, 0)); // ~ @@ -291,7 +292,7 @@ class ContrastChecker extends GridPane { add(bgAlphaLabel, 0, 10); add(bgAlphaSlider, 0, 11); - add(controlsBox, 0, 12, REMAINING, 1); + add(actionsBox, 0, 12, REMAINING, 1); // column 1 add(new Label("Foreground Color"), 1, 1); diff --git a/sampler/src/main/resources/assets/styles/scss/layout/_page.scss b/sampler/src/main/resources/assets/styles/scss/layout/_page.scss index 09e2a62..d1fa01c 100644 --- a/sampler/src/main/resources/assets/styles/scss/layout/_page.scss +++ b/sampler/src/main/resources/assets/styles/scss/layout/_page.scss @@ -26,6 +26,17 @@ -fx-pref-width: 150px; -color-cell-bg-selected: -color-cell-bg; -color-cell-fg-selected: -color-accent-fg; + + .list-cell { + &:filled { + -fx-border-width: 0 0 0 2; + -fx-border-color: -color-border-muted; + } + &:selected { + -color-cell-fg: -color-cell-fg-selected; + -fx-border-color: -color-accent-emphasis; + } + } } } } @@ -51,4 +62,4 @@ -fx-fill: -color-accent-muted; } } -} \ No newline at end of file +} diff --git a/sampler/src/main/resources/assets/styles/scss/widgets/_contrast-checker.scss b/sampler/src/main/resources/assets/styles/scss/widgets/_contrast-checker.scss index c2a399b..af9a924 100644 --- a/sampler/src/main/resources/assets/styles/scss/widgets/_contrast-checker.scss +++ b/sampler/src/main/resources/assets/styles/scss/widgets/_contrast-checker.scss @@ -42,10 +42,6 @@ -color-button-fg-pressed: -color-contrast-checker-fg; -color-button-border-pressed: transparent; - -fx-border-width: 1px; - -fx-border-color: -color-contrast-checker-fg; - -fx-border-radius: 4px; - &:armed, &:focused:armed { -fx-border-color: transparent; @@ -99,6 +95,14 @@ } } + >.actions { + >.button { + -fx-border-width: 1px; + -fx-border-color: -color-contrast-checker-fg; + -fx-border-radius: 4px; + } + } + .context-menu { -fx-background-color: -color-border-muted, -color-bg-default; @@ -121,9 +125,11 @@ >.close-button { -color-button-fg: -color-dialog-fg; - -color-button-bg-hover: derive(-color-dialog-bg, 10%); + -color-button-bg-hover: derive(-color-dialog-bg, 30%); + -color-button-border-hover: transparent; + -color-button-border-focused: transparent; } } -fx-border-color: -color-dialog-bg; -} \ No newline at end of file +}