add config file setting to disable Fyne DPI detection

This commit is contained in:
Drew Weymouth
2025-02-08 23:05:33 -03:00
parent c42229951c
commit 3b5c896eb9
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -52,6 +52,7 @@ type AppConfig struct {
SkipSSLVerify bool
EnqueueBatchSize int
Language string
DisableDPIDetection bool
// Experimental - may be removed in future
FontNormalTTF string
+4
View File
@@ -47,6 +47,10 @@ func main() {
os.Setenv("FYNE_SCALE", "1.1")
}
if myApp.Config.Application.DisableDPIDetection {
os.Setenv("FYNE_DISABLE_DPI_DETECTION", "true")
}
// load configured app language, or all otherwise
lIdx := slices.IndexFunc(res.TranslationsInfo, func(t res.TranslationInfo) bool {
return t.Name == myApp.Config.Application.Language