Skip to content

Commit

Permalink
Macos theming (#7)
Browse files Browse the repository at this point in the history
* Use system theme when on macOS

* Remove sout
  • Loading branch information
matthewperiut authored Oct 15, 2024
1 parent 664f5aa commit 1d1e1b7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/babric/BabricLoomPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.gradle.api.Project;
import org.gradle.api.plugins.PluginAware;
import org.gradle.api.provider.ListProperty;
import org.gradle.internal.os.OperatingSystem;

import java.util.Map;
import java.util.Objects;
Expand Down Expand Up @@ -46,5 +47,15 @@ private void applyProject(Project project) {
});

extension.addMinecraftJarProcessor(NestFixingJarProcessor.class);

project.afterEvaluate(p -> {
if (OperatingSystem.current().isMacOsX()) {
extension.getRunConfigs().configureEach(runConfig -> {
if (runConfig.getName().equals("client")) {
runConfig.getVmArgs().add("-Dapple.awt.application.appearance=system");
}
});
}
});
}
}

0 comments on commit 1d1e1b7

Please sign in to comment.