mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-14 06:17:47 -04: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.i18n.Locales.SupportedLocale;
|
||||||
import org.jackhuang.hmcl.util.javafx.ObservableHelper;
|
import org.jackhuang.hmcl.util.javafx.ObservableHelper;
|
||||||
import org.jackhuang.hmcl.util.javafx.PropertyUtils;
|
import org.jackhuang.hmcl.util.javafx.PropertyUtils;
|
||||||
|
import org.jackhuang.hmcl.util.platform.OperatingSystem;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.net.Proxy;
|
import java.net.Proxy;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -146,7 +148,7 @@ public final class Config implements Cloneable, Observable {
|
|||||||
private ObservableList<Map<Object, Object>> accountStorages = FXCollections.observableArrayList();
|
private ObservableList<Map<Object, Object>> accountStorages = FXCollections.observableArrayList();
|
||||||
|
|
||||||
@SerializedName("fontFamily")
|
@SerializedName("fontFamily")
|
||||||
private StringProperty fontFamily = new SimpleStringProperty("Monospace");
|
private StringProperty fontFamily = new SimpleStringProperty(OperatingSystem.CURRENT_OS == OperatingSystem.WINDOWS ? "Consolas" : "Monospace");
|
||||||
|
|
||||||
@SerializedName("fontSize")
|
@SerializedName("fontSize")
|
||||||
private DoubleProperty fontSize = new SimpleDoubleProperty(12);
|
private DoubleProperty fontSize = new SimpleDoubleProperty(12);
|
||||||
@ -188,10 +190,6 @@ public final class Config implements Cloneable, Observable {
|
|||||||
private transient ObservableHelper helper = new ObservableHelper(this);
|
private transient ObservableHelper helper = new ObservableHelper(this);
|
||||||
|
|
||||||
public Config() {
|
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);
|
PropertyUtils.attachListener(this, helper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user