Skip to content

Commit

Permalink
add config file setting to disable Fyne DPI detection
Browse files Browse the repository at this point in the history
  • Loading branch information
dweymouth committed Feb 9, 2025
1 parent c422299 commit 3b5c896
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions backend/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ type AppConfig struct {
SkipSSLVerify bool
EnqueueBatchSize int
Language string
DisableDPIDetection bool

// Experimental - may be removed in future
FontNormalTTF string
Expand Down
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3b5c896

Please sign in to comment.