diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2024-11-05 06:20:59 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2024-11-05 06:20:59 +0100 |
commit | cd405ccb6af8ae1962b24d7456f159c57ef9b8a6 (patch) | |
tree | 67236d4796a35a831851ceb0c7b199a8c9f5a027 /xA | |
parent | f465b596a16221d04c027aee327ee894dedc3669 (diff) | |
download | xK-cd405ccb6af8ae1962b24d7456f159c57ef9b8a6.tar.gz xK-cd405ccb6af8ae1962b24d7456f159c57ef9b8a6.tar.xz xK-cd405ccb6af8ae1962b24d7456f159c57ef9b8a6.zip |
Diffstat (limited to 'xA')
-rw-r--r-- | xA/xA.go | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -69,10 +69,13 @@ func convertColor(c int) color.Color { var ircColors = make(map[fyne.ThemeColorName]color.Color) +func ircColorName(color int) fyne.ThemeColorName { + return fyne.ThemeColorName(fmt.Sprintf("irc%02x", color)) +} + func init() { for color := 0; color < 256; color++ { - ircColors[fyne.ThemeColorName( - fmt.Sprintf("irc%02x", color))] = convertColor(color) + ircColors[ircColorName(color)] = convertColor(color) } } @@ -115,7 +118,7 @@ type bufferLineItem struct { format fyne.TextStyle // For RichTextStyle.ColorName. // XXX: Fyne's RichText doesn't support background colours. - color string + color fyne.ThemeColorName text string } |