Run gofumpt on the project
This commit is contained in:
@@ -49,7 +49,7 @@ func NewAuxControls(initialVolume int, initialLoopMode backend.LoopMode, initial
|
||||
a.cast.SetToolTip(lang.L("Cast to device"))
|
||||
|
||||
a.autoplay.Highlighted = initialAutoplay
|
||||
//a.autoplay.IconSize = IconButtonSizeSmaller
|
||||
// a.autoplay.IconSize = IconButtonSizeSmaller
|
||||
a.autoplay.SetToolTip(lang.L("Autoplay"))
|
||||
a.autoplay.OnTapped = func() {
|
||||
a.SetAutoplay(!a.autoplay.Highlighted)
|
||||
|
||||
@@ -71,10 +71,12 @@ func (g *FocusList) FocusNeighbor(curItem widget.ListItemID, up bool) {
|
||||
}
|
||||
}
|
||||
|
||||
var _ fyne.Tappable = (*FocusListRowBase)(nil)
|
||||
var _ fyne.Widget = (*FocusListRowBase)(nil)
|
||||
var _ fyne.Focusable = (*FocusListRowBase)(nil)
|
||||
var _ desktop.Hoverable = (*FocusListRowBase)(nil)
|
||||
var (
|
||||
_ fyne.Tappable = (*FocusListRowBase)(nil)
|
||||
_ fyne.Widget = (*FocusListRowBase)(nil)
|
||||
_ fyne.Focusable = (*FocusListRowBase)(nil)
|
||||
_ desktop.Hoverable = (*FocusListRowBase)(nil)
|
||||
)
|
||||
|
||||
// Base type used for all list rows in widgets such as Tracklist, etc.
|
||||
type FocusListRowBase struct {
|
||||
@@ -88,7 +90,7 @@ type FocusListRowBase struct {
|
||||
|
||||
OnTapped func()
|
||||
OnDoubleTapped func()
|
||||
OnFocusNeighbor func(up bool) //TODO: func(up, selecting bool)
|
||||
OnFocusNeighbor func(up bool) // TODO: func(up, selecting bool)
|
||||
|
||||
tappedAt int64 // unixMillis
|
||||
focusedRect canvas.Rectangle
|
||||
|
||||
@@ -21,8 +21,10 @@ import (
|
||||
"github.com/dweymouth/supersonic/ui/util"
|
||||
)
|
||||
|
||||
var _ fyne.Widget = (*GridViewItem)(nil)
|
||||
var _ fyne.Focusable = (*GridViewItem)(nil)
|
||||
var (
|
||||
_ fyne.Widget = (*GridViewItem)(nil)
|
||||
_ fyne.Focusable = (*GridViewItem)(nil)
|
||||
)
|
||||
|
||||
var _ fyne.Widget = (*coverImage)(nil)
|
||||
|
||||
|
||||
@@ -28,8 +28,10 @@ type LoadingDots struct {
|
||||
func NewLoadingDots() *LoadingDots {
|
||||
l := &LoadingDots{}
|
||||
for i := range l.dots {
|
||||
l.dots[i] = minSizeCircle{Circle: canvas.Circle{
|
||||
FillColor: theme.DisabledColor()},
|
||||
l.dots[i] = minSizeCircle{
|
||||
Circle: canvas.Circle{
|
||||
FillColor: theme.DisabledColor(),
|
||||
},
|
||||
}
|
||||
}
|
||||
l.ExtendBaseWidget(l)
|
||||
|
||||
@@ -31,7 +31,7 @@ type MultiHyperlink struct {
|
||||
|
||||
// TODO: Once https://github.com/fyne-io/fyne/issues/4336 is resolved,
|
||||
// we can switch to the much cleaner RichText implementation
|
||||
//provider *widget.RichText
|
||||
// provider *widget.RichText
|
||||
|
||||
objects []fyne.CanvasObject
|
||||
suffixLabel *ttwidget.RichText
|
||||
@@ -45,11 +45,11 @@ type MultiHyperlinkSegment struct {
|
||||
|
||||
func NewMultiHyperlink() *MultiHyperlink {
|
||||
c := &MultiHyperlink{
|
||||
//provider: widget.NewRichText(),
|
||||
// provider: widget.NewRichText(),
|
||||
content: container.NewWithoutLayout(),
|
||||
}
|
||||
c.ExtendBaseWidget(c)
|
||||
//c.provider.Truncation = fyne.TextTruncateEllipsis
|
||||
// c.provider.Truncation = fyne.TextTruncateEllipsis
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -302,12 +302,12 @@ func (c *MultiHyperlink) Resize(size fyne.Size) {
|
||||
}
|
||||
|
||||
func (c *MultiHyperlink) Refresh() {
|
||||
//c.syncSegments()
|
||||
// c.syncSegments()
|
||||
c.layoutObjects()
|
||||
c.BaseWidget.Refresh()
|
||||
}
|
||||
|
||||
func (c *MultiHyperlink) CreateRenderer() fyne.WidgetRenderer {
|
||||
return widget.NewSimpleRenderer(c.content)
|
||||
//return widget.NewSimpleRenderer(c.provider)
|
||||
// return widget.NewSimpleRenderer(c.provider)
|
||||
}
|
||||
|
||||
@@ -264,7 +264,6 @@ func (p *PlayQueueList) onShowContextMenu(e *fyne.PointEvent, trackIdx int) {
|
||||
p.ensureRadiosMenu()
|
||||
p.radiosMenu.ShowAtPosition(e.AbsolutePosition)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (p *PlayQueueList) ensureTracksMenu() {
|
||||
|
||||
@@ -103,7 +103,7 @@ var _ fyne.Tappable = (*StarRating)(nil)
|
||||
|
||||
func (s *StarRating) Tapped(*fyne.PointEvent) {
|
||||
if s.mouseHoverRating <= 0 {
|
||||
return //shouldn't happen
|
||||
return // shouldn't happen
|
||||
}
|
||||
if s.Rating == s.mouseHoverRating {
|
||||
s.Rating = 0
|
||||
|
||||
@@ -352,6 +352,7 @@ func (t *tracklistRowBase) create(tracklist *Tracklist) {
|
||||
func (t *tracklistRowBase) SetOnTappedSecondary(f func(*fyne.PointEvent, int)) {
|
||||
t.OnTappedSecondary = f
|
||||
}
|
||||
|
||||
func (t *tracklistRowBase) TrackID() string {
|
||||
return t.trackID
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user