VideoTools/vendor/fyne.io/fyne/v2/test/theme_helper.go
Stu Leak 68df790d27 Fix player frame generation and video playback
Major improvements to UnifiedPlayer:

1. GetFrameImage() now works when paused for responsive UI updates
2. Play() method properly starts FFmpeg process
3. Frame display loop runs continuously for smooth video display
4. Disabled audio temporarily to fix video playback fundamentals
5. Simplified FFmpeg command to focus on video stream only

Player now:
- Generates video frames correctly
- Shows video when paused
- Has responsive progress tracking
- Starts playback properly

Next steps: Re-enable audio playback once video is stable
2026-01-07 22:20:00 -05:00

32 lines
1.1 KiB
Go

//go:build !tamago && !noos
package test
import (
"image/color"
"testing"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/theme"
"github.com/stretchr/testify/assert"
)
// AssertAllColorNamesDefined asserts that all known color names are defined for the given theme.
func AssertAllColorNamesDefined(t *testing.T, th fyne.Theme, themeName string) {
oldApp := fyne.CurrentApp()
defer fyne.SetCurrentApp(oldApp)
for _, primaryName := range theme.PrimaryColorNames() {
testApp := NewTempApp(t)
testApp.Settings().(*testSettings).primaryColor = primaryName
for variantName, variant := range KnownThemeVariants() {
for _, cn := range knownColorNames {
assert.NotNil(t, th.Color(cn, variant), "undefined color %s variant %s in theme %s", cn, variantName, themeName)
// Transparent is used by the default theme as fallback for unknown color names.
// Built-in color names should have well-defined non-transparent values.
assert.NotEqual(t, color.Transparent, th.Color(cn, variant), "undefined color %s variant %s in theme %s", cn, variantName, themeName)
}
}
}
}