Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ final class ComponentSublistWrapper extends VBox implements NoPaddingComponent {
private boolean expanded = false;

ComponentSublistWrapper(ComponentSublist sublist) {
boolean noPadding = !sublist.hasComponentPadding();

this.getStyleClass().add("options-sublist-wrapper");

Node expandIcon = SVG.KEYBOARD_ARROW_DOWN.createIcon(20);
Expand Down Expand Up @@ -104,10 +102,7 @@ final class ComponentSublistWrapper extends VBox implements NoPaddingComponent {

if (container == null) {
this.container = new VBox();

if (!noPadding) {
container.setPadding(new Insets(8, 16, 10, 16));
}
this.container.getStyleClass().add("container");
FXUtils.setLimitHeight(container, 0);
FXUtils.setOverflowHidden(container);
container.getChildren().setAll(sublist);
Expand All @@ -120,8 +115,7 @@ final class ComponentSublistWrapper extends VBox implements NoPaddingComponent {
}

Platform.runLater(() -> {
// FIXME: ComponentSubList without padding must have a 4 pixel padding for displaying a border radius.
double contentHeight = expanded ? (sublist.prefHeight(sublist.getWidth()) + (noPadding ? 4 : 8 + 10)) : 0;
double contentHeight = expanded ? sublist.prefHeight(sublist.getWidth()) : 0;
double targetRotate = expanded ? -180 : 0;

if (AnimationUtils.isAnimationEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public final class MultiFileItem<T> extends VBox {

@SuppressWarnings("unchecked")
public MultiFileItem() {
setPadding(new Insets(0, 0, 10, 0));
this.getStyleClass().add("multi-file-item");

setSpacing(8);

group.selectedToggleProperty().addListener((a, b, newValue) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,6 @@ public AdvancedVersionSettingPage(Profile profile, @Nullable String versionId, V
new MultiFileItem.Option<>(i18n("settings.advanced.natives_directory.default"), NativesDirectoryType.VERSION_FOLDER),
nativesDirCustomOption
));
HintPane nativesDirHint = new HintPane(MessageDialogPane.MessageType.WARNING);
nativesDirHint.setText(i18n("settings.advanced.natives_directory.hint"));
nativesDirItem.getChildren().add(nativesDirHint);

graphicsBackendPane = new LineSelectButton<>();
graphicsBackendPane.setTitle(i18n("settings.advanced.graphics_backend"));
Expand Down
18 changes: 17 additions & 1 deletion HMCL/src/main/resources/assets/css/root.css
Original file line number Diff line number Diff line change
Expand Up @@ -1093,8 +1093,12 @@
-fx-background-color: -monet-error-container;
}

.multi-file-item {
-fx-padding: 10 0 10 0;
}

.options-sublist {
-fx-background-color: -monet-surface;
-fx-background-color: -monet-surface-container;
}

.options-list-item {
Expand All @@ -1105,6 +1109,14 @@
-fx-font-size: 12;
}

.options-sublist .options-list-item {
-fx-background-color: -monet-surface-container;
}

.options-sublist .multi-file-item {
-fx-padding: 10 10 10 10;
}

.options-list-item .svg {
-fx-fill: -monet-on-surface;
-fx-border-color: -monet-outline-variant;
Expand Down Expand Up @@ -1140,6 +1152,10 @@
-fx-border-width: 0;
}

.options-sublist-wrapper > .container {
-fx-background-color: -monet-surface-container;
}

.options-sublist-wrapper .expand-icon .svg {
-fx-fill: -monet-on-surface-variant;
}
Expand Down