Skip to content

Commit

Permalink
Merge pull request #5251 from Jacalz/no_animations
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz authored Nov 20, 2024
2 parents b3f9766 + 370d051 commit 9476f0f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
4 changes: 1 addition & 3 deletions app/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import (
"fyne.io/fyne/v2/theme"
)

var noAnimations bool // set to true at compile time if no_animations tag is passed

// SettingsSchema is used for loading and storing global settings
type SettingsSchema struct {
// these items are used for global settings load
Expand Down Expand Up @@ -82,7 +80,7 @@ func (s *settings) SetTheme(theme fyne.Theme) {
}

func (s *settings) ShowAnimations() bool {
return !s.schema.DisableAnimations && !noAnimations
return !s.schema.DisableAnimations && !build.NoAnimations
}

func (s *settings) ThemeVariant() fyne.ThemeVariant {
Expand Down
7 changes: 0 additions & 7 deletions app/settings_noanimation.go

This file was deleted.

7 changes: 7 additions & 0 deletions internal/build/animations_disabled.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//go:build no_animations

package build

// NoAnimations is true if the application was built without animations by
// passing the no_animations build tag.
const NoAnimations = true
7 changes: 7 additions & 0 deletions internal/build/animations_enabled.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//go:build !no_animations

package build

// NoAnimations is true if the application was built without animations by
// passing the no_animations build tag.
const NoAnimations = false

0 comments on commit 9476f0f

Please sign in to comment.