From 3b5c896eb91f22e3c110f1350a0e26efcd7acc89 Mon Sep 17 00:00:00 2001 From: Drew Weymouth Date: Sat, 8 Feb 2025 23:05:33 -0300 Subject: [PATCH] add config file setting to disable Fyne DPI detection --- backend/config.go | 1 + main.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/backend/config.go b/backend/config.go index cf67efe2..e94e40dc 100644 --- a/backend/config.go +++ b/backend/config.go @@ -52,6 +52,7 @@ type AppConfig struct { SkipSSLVerify bool EnqueueBatchSize int Language string + DisableDPIDetection bool // Experimental - may be removed in future FontNormalTTF string diff --git a/main.go b/main.go index 96511eac..6c790868 100644 --- a/main.go +++ b/main.go @@ -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