Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions serverpic.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package rendercard
import (
"image"
"image/color"
"math/rand"
"sync"

"github.com/FloatTech/floatbox/math"
Expand Down Expand Up @@ -143,17 +142,17 @@ func renderinfocards(torussd, glowsd []byte, plugininfos []*PluginInfo) (img ima
fade.AddColorStop(0.7, color.NRGBA{204, 51, 51, 63})
fade.AddColorStop(0.6, color.NRGBA{204, 51, 51, 0})
fade.AddColorStop(0, color.NRGBA{204, 51, 51, 0})
statusimage := drawEnableOrDisableImage(false)
statusimage := drawEnableOrDisableImage(plugininfos[i].Status)

if plugininfos[i].Status && rand.Intn(2) == 0 {
if plugininfos[i].Status {
canvas.SetRGBA255(136, 178, 0, 255)
fade = gg.NewLinearGradient(beginw+10, 0, beginw+cardw-10, 0)
fade.AddColorStop(1, color.NRGBA{136, 178, 0, 255})
fade.AddColorStop(0.8, color.NRGBA{136, 178, 0, 191})
fade.AddColorStop(0.7, color.NRGBA{136, 178, 0, 63})
fade.AddColorStop(0.6, color.NRGBA{136, 178, 0, 0})
fade.AddColorStop(0, color.NRGBA{136, 178, 0, 0})
statusimage = drawEnableOrDisableImage(true)
statusimage = drawEnableOrDisableImage(plugininfos[i].Status)
}

canvas.DrawRoundedRectangle(beginw+10, beginh, cardw-10, cardh, 16)
Expand Down
Loading