mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2024-12-27 07:10:41 +08:00
fixup! use suggested OS detection
This commit is contained in:
parent
718c0a668a
commit
b91dba3141
@ -40,8 +40,10 @@ import org.jackhuang.hmcl.util.i18n.Locales;
|
||||
import org.jackhuang.hmcl.util.i18n.Locales.SupportedLocale;
|
||||
import org.jackhuang.hmcl.util.javafx.ObservableHelper;
|
||||
import org.jackhuang.hmcl.util.javafx.PropertyUtils;
|
||||
import org.jackhuang.hmcl.util.platform.OperatingSystem;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.net.Proxy;
|
||||
import java.util.Map;
|
||||
@ -146,7 +148,7 @@ public final class Config implements Cloneable, Observable {
|
||||
private ObservableList<Map<Object, Object>> accountStorages = FXCollections.observableArrayList();
|
||||
|
||||
@SerializedName("fontFamily")
|
||||
private StringProperty fontFamily = new SimpleStringProperty("Monospace");
|
||||
private StringProperty fontFamily = new SimpleStringProperty(OperatingSystem.CURRENT_OS == OperatingSystem.WINDOWS ? "Consolas" : "Monospace");
|
||||
|
||||
@SerializedName("fontSize")
|
||||
private DoubleProperty fontSize = new SimpleDoubleProperty(12);
|
||||
@ -188,10 +190,6 @@ public final class Config implements Cloneable, Observable {
|
||||
private transient ObservableHelper helper = new ObservableHelper(this);
|
||||
|
||||
public Config() {
|
||||
// Default override for better-looking logs on Windows
|
||||
if (System.getProperty("os.name").startsWith("Windows")) {
|
||||
this.fontFamily.setValue("Consolas");
|
||||
}
|
||||
PropertyUtils.attachListener(this, helper);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user