Updates #22: add focus arrow key navigation to grid view

This commit is contained in:
Drew Weymouth
2024-02-02 08:44:52 -08:00
parent 5db80c7109
commit 7e8a4d6d37
3 changed files with 152 additions and 26 deletions
+9
View File
@@ -3,6 +3,7 @@ package util
import (
"fmt"
"image"
"image/color"
"math"
"strconv"
"strings"
@@ -24,6 +25,14 @@ import (
var BoldRichTextStyle = widget.RichTextStyle{TextStyle: fyne.TextStyle{Bold: true}, Inline: true}
func MakeOpaque(c color.Color) color.Color {
if nrgba, ok := c.(color.NRGBA); ok {
nrgba.A = 255
return nrgba
}
return c
}
func SecondsToTimeString(s float64) string {
if s < 0 {
s = 0