Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CleanScaleCSS = css.PrepareClass("clean-scale", `
.clean-scale {
margin: -2px 0px;
}
.clean-scale trough,
.clean-scale highlight {
border-radius: 9999px;
}
.clean-scale slider {
padding: 1px;
background: none;
transition: linear 75ms background;
}
.clean-scale:hover slider {
/* Shitty hack to limit background size. Thanks, GTK. */
background: radial-gradient(
circle,
@theme_selected_bg_color 0%,
@theme_selected_bg_color 25%,
transparent 30%,
transparent
);
}
`)
Functions ¶
This section is empty.
Types ¶
type Buttons ¶
type Buttons struct { gtk.Box Shuffle *gtk.ToggleButton Prev *gtk.Button Play *PlayPause // Pause Next *gtk.Button Repeat *Repeat }
func NewButtons ¶
func NewButtons(parent ParentController) *Buttons
func (*Buttons) SetRepeat ¶
func (b *Buttons) SetRepeat(mode state.RepeatMode, callback bool)
SetRepeat sets Repeat's mode. It does NOT trigger a callback to the parent.
func (*Buttons) SetShuffle ¶
SetShuffle controls the shuffle button's state and triggers the callback.
type Container ¶
func NewContainer ¶
func NewContainer(parent ParentController) *Container
type ParentController ¶
type ParentController interface { Previous() Next() Seek(position float64) SetPlay(playing bool) SetRepeat(repeatMode state.RepeatMode) SetShuffle(shuffle bool) }
type PlayPause ¶
type PlayPause struct { gtk.Button // contains filtered or unexported fields }
func NewPlayPause ¶
func NewPlayPause(parent ParentController) *PlayPause
func (*PlayPause) SetPlaying ¶
type Repeat ¶
type Repeat struct { gtk.ToggleButton // contains filtered or unexported fields }
func NewRepeat ¶
func NewRepeat(parent ParentController) *Repeat
type Seek ¶
type Seek struct { gtk.Box Position *gtk.Label SeekBar *gtk.Scale TotalTime *gtk.Label // contains filtered or unexported fields }
func NewSeek ¶
func NewSeek(parent ParentController) *Seek
func (*Seek) UpdatePosition ¶
Click to show internal directories.
Click to hide internal directories.