VideoTools/vendor/fyne.io/fyne/v2/layout/spacer.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

81 lines
1.9 KiB
Go

package layout
import "fyne.io/fyne/v2"
// SpacerObject is any object that can be used to space out child objects
type SpacerObject interface {
ExpandVertical() bool
ExpandHorizontal() bool
}
// Spacer is any simple object that can be used in a box layout to space
// out child objects
type Spacer struct {
FixHorizontal bool
FixVertical bool
size fyne.Size
pos fyne.Position
hidden bool
}
// NewSpacer returns a spacer object which can fill vertical and horizontal
// space. This is primarily used with a box layout.
func NewSpacer() fyne.CanvasObject {
return &Spacer{}
}
// ExpandVertical returns whether or not this spacer expands on the vertical axis
func (s *Spacer) ExpandVertical() bool {
return !s.FixVertical
}
// ExpandHorizontal returns whether or not this spacer expands on the horizontal axis
func (s *Spacer) ExpandHorizontal() bool {
return !s.FixHorizontal
}
// Size returns the current size of this Spacer
func (s *Spacer) Size() fyne.Size {
return s.size
}
// Resize sets a new size for the Spacer - this will be called by the layout
func (s *Spacer) Resize(size fyne.Size) {
s.size = size
}
// Position returns the current position of this Spacer
func (s *Spacer) Position() fyne.Position {
return s.pos
}
// Move sets a new position for the Spacer - this will be called by the layout
func (s *Spacer) Move(pos fyne.Position) {
s.pos = pos
}
// MinSize returns a 0 size as a Spacer can shrink to no actual size
func (s *Spacer) MinSize() fyne.Size {
return fyne.NewSize(0, 0)
}
// Visible returns true if this spacer should affect the layout
func (s *Spacer) Visible() bool {
return !s.hidden
}
// Show sets the Spacer to be part of the layout calculations
func (s *Spacer) Show() {
s.hidden = false
}
// Hide removes this Spacer from layout calculations
func (s *Spacer) Hide() {
s.hidden = true
}
// Refresh does nothing for a spacer but is part of the CanvasObject definition
func (s *Spacer) Refresh() {
}