Minor UI improvements

This commit is contained in:
mkpaz 2022-09-30 14:35:29 +04:00
parent ef930a7907
commit 1286854da5
4 changed files with 31 additions and 13 deletions

@ -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);

@ -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);

@ -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;
}
}
}
}

@ -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;
}
}