enable drag and drop reordering
This commit is contained in:
@@ -17,7 +17,6 @@ import (
|
||||
"fyne.io/fyne/v2/widget"
|
||||
"github.com/dweymouth/supersonic/backend/mediaprovider"
|
||||
"github.com/dweymouth/supersonic/res"
|
||||
"github.com/dweymouth/supersonic/sharedutil"
|
||||
myTheme "github.com/dweymouth/supersonic/ui/theme"
|
||||
"golang.org/x/net/html"
|
||||
)
|
||||
@@ -227,18 +226,6 @@ func NewRatingSubmenu(onSetRating func(int)) *fyne.MenuItem {
|
||||
return ratingMenu
|
||||
}
|
||||
|
||||
func NewReorderTracksSubmenu(onReorderTracks func(sharedutil.TrackReorderOp)) *fyne.MenuItem {
|
||||
reorderMenu := fyne.NewMenuItem("Reorder tracks", nil)
|
||||
reorderMenu.Icon = myTheme.SortIcon
|
||||
reorderMenu.ChildMenu = fyne.NewMenu("", []*fyne.MenuItem{
|
||||
fyne.NewMenuItem("Move to top", func() { onReorderTracks(sharedutil.MoveToTop) }),
|
||||
fyne.NewMenuItem("Move up", func() { onReorderTracks(sharedutil.MoveUp) }),
|
||||
fyne.NewMenuItem("Move down", func() { onReorderTracks(sharedutil.MoveDown) }),
|
||||
fyne.NewMenuItem("Move to bottom", func() { onReorderTracks(sharedutil.MoveToBottom) }),
|
||||
}...)
|
||||
return reorderMenu
|
||||
}
|
||||
|
||||
func AddHeaderBackground(obj fyne.CanvasObject) *fyne.Container {
|
||||
return AddHeaderBackgroundWithColorName(obj, myTheme.ColorNamePageHeader)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user