make pop up play queue slightly translucent

This commit is contained in:
Drew Weymouth
2024-07-25 07:54:34 -07:00
parent bcf2d044a5
commit da2a175c5b
2 changed files with 53 additions and 2 deletions
+12 -2
View File
@@ -5,6 +5,7 @@ import (
"context"
"fmt"
"image"
"image/color"
"io"
"log"
"net/url"
@@ -18,6 +19,7 @@ import (
"github.com/dweymouth/supersonic/backend/player/mpv"
"github.com/dweymouth/supersonic/sharedutil"
"github.com/dweymouth/supersonic/ui/dialogs"
myTheme "github.com/dweymouth/supersonic/ui/theme"
"github.com/dweymouth/supersonic/ui/util"
"github.com/dweymouth/supersonic/ui/widgets"
@@ -121,10 +123,18 @@ func (m *Controller) ShowPopUpPlayQueue() {
title := widget.NewRichTextWithText(lang.L("Play Queue"))
title.Segments[0].(*widget.TextSegment).Style.Alignment = fyne.TextAlignCenter
title.Segments[0].(*widget.TextSegment).Style.TextStyle.Bold = true
container := container.NewBorder(title, nil, nil, nil,
ctr := container.NewBorder(title, nil, nil, nil,
container.NewPadded(m.popUpQueue),
)
pop := widget.NewPopUp(container, m.MainWindow.Canvas())
pop := widget.NewPopUp(ctr, m.MainWindow.Canvas())
container.NewThemeOverride(pop, myTheme.WithColorTransformOverride(
theme.ColorNameOverlayBackground,
func(c color.Color) color.Color {
c_ := c.(color.NRGBA)
c_.A = 245
return c_
},
))
m.ClosePopUpOnEscape(pop)
minSize := fyne.NewSize(300, 400)
maxSize := fyne.NewSize(800, 1000)