Upgrade to latest Tomo version
This commit is contained in:
parent
472d9fdfde
commit
e7264cf7d2
4
go.mod
4
go.mod
@ -2,6 +2,6 @@ module git.tebibyte.media/tomo/wintergreen
|
||||
|
||||
go 1.20
|
||||
|
||||
require git.tebibyte.media/tomo/tomo v0.19.0
|
||||
require git.tebibyte.media/tomo/tomo v0.21.0
|
||||
|
||||
require golang.org/x/image v0.8.0 // indirect
|
||||
require golang.org/x/image v0.8.0
|
||||
|
4
go.sum
4
go.sum
@ -1,5 +1,5 @@
|
||||
git.tebibyte.media/tomo/tomo v0.19.0 h1:emnkcwMRP+Kpk+NFwYtLfQ21H48EFR2ejfaZPhXKmOA=
|
||||
git.tebibyte.media/tomo/tomo v0.19.0/go.mod h1:lTwjpiHbP4UN/kFw+6FwhG600B+PMKVtMOr7wpd5IUY=
|
||||
git.tebibyte.media/tomo/tomo v0.21.0 h1:qUk2FJ355NMpoMlO1NM7G/lRAAKJs3nnpF0VTWqF1Vs=
|
||||
git.tebibyte.media/tomo/tomo v0.21.0/go.mod h1:lTwjpiHbP4UN/kFw+6FwhG600B+PMKVtMOr7wpd5IUY=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
|
13
theme.go
13
theme.go
@ -9,7 +9,7 @@ import "git.tebibyte.media/tomo/tomo/event"
|
||||
|
||||
var colorFocus = color.RGBA { R: 61, G: 128, B: 143, A: 255 }
|
||||
var colorInput = color.RGBA { R: 208, G: 203, B: 150, A: 255 }
|
||||
var colorCarved = color.RGBA { R: 169, G: 171, B: 168, A: 255 }
|
||||
var colorCarved = color.RGBA { R: 151, G: 160, B: 150, A: 255 }
|
||||
var colorShadow = color.RGBA { R: 57, G: 59, B: 57, A: 255 }
|
||||
var colorInputShadow = color.RGBA { R: 143, G: 146, B: 91, A: 255 }
|
||||
var colorHighlight = color.RGBA { R: 207, G: 215, B: 210, A: 255 }
|
||||
@ -34,6 +34,17 @@ var borderColorFocused = [4]color.Color { colorFocus, colorFocus, col
|
||||
|
||||
type Theme struct { }
|
||||
|
||||
func (Theme) RGBA (id theme.Color) (r, g, b, a uint32) {
|
||||
switch id {
|
||||
case theme.ColorBackground: return colorBackground .RGBA()
|
||||
case theme.ColorForeground: return colorForeground .RGBA()
|
||||
case theme.ColorRaised: return colorCarved .RGBA()
|
||||
case theme.ColorSunken: return colorCarved .RGBA()
|
||||
case theme.ColorAccent: return colorFocus .RGBA()
|
||||
default: return color.Transparent.RGBA()
|
||||
}
|
||||
}
|
||||
|
||||
func (Theme) Apply (object tomo.Object, role theme.Role) event.Cookie {
|
||||
box := object.Box()
|
||||
|
||||
|
Reference in New Issue
Block a user