feat: change style of text field and combo box to match Chrome.

This commit is contained in:
huanghongxun
2021-09-03 03:54:13 +08:00
parent 050fa30a35
commit feb15a3c64
2 changed files with 9 additions and 5 deletions

View File

@@ -176,7 +176,7 @@ public final class VersionSettingsPage extends StackPane implements DecoratorPag
chkAutoAllocate = new JFXCheckBox(i18n("settings.memory.auto_allocate"));
VBox.setMargin(chkAutoAllocate, new Insets(0, 0, 8, 5));
HBox lowerBoundPane = new HBox();
HBox lowerBoundPane = new HBox(8);
lowerBoundPane.setAlignment(Pos.CENTER);
VBox.setMargin(lowerBoundPane, new Insets(0, 0, 0, 16));
{
@@ -190,7 +190,7 @@ public final class VersionSettingsPage extends StackPane implements DecoratorPag
}, chkAutoAllocate.selectedProperty()));
JFXSlider slider = new JFXSlider(0, 1, 0);
HBox.setMargin(slider, new Insets(0, 16, 0, 16));
HBox.setMargin(slider, new Insets(0, 0, 0, 8));
HBox.setHgrow(slider, Priority.ALWAYS);
slider.setValueFactory(self -> Bindings.createStringBinding(() -> (int)(self.getValue() * 100) + "%", self.valueProperty()));
AtomicBoolean changedByTextField = new AtomicBoolean(false);

View File

@@ -665,13 +665,14 @@
*******************************************************************************/
.jfx-text-field, .jfx-password-field, .jfx-text-area {
-fx-background-color: transparent;
-fx-background-color: #f1f3f4;
-fx-font-weight: BOLD;
-fx-prompt-text-fill: #808080;
-fx-alignment: top-left;
-fx-pref-width: 300.0;
-jfx-focus-color: -fx-base-check-color;
-jfx-unfocus-color: #4d4d4d;
-fx-padding: 8;
-jfx-unfocus-color: transparent;
}
.jfx-text-area .viewport {
@@ -1123,7 +1124,10 @@
*******************************************************************************/
.jfx-combo-box {
-jfx-focus-color: -fx-base-check-color;
-jfx-focus-color: transparent;
-jfx-unfocus-color: transparent;
-fx-background-color: #f1f3f4;
-fx-padding: 4;
}
.jfx-combo-box-warning {