Added default colors to things

This commit is contained in:
Sasha Koshka 2023-08-06 03:42:06 -04:00
parent b74ec4336f
commit a3b4ae74cf
4 changed files with 5 additions and 3 deletions

1
box.go
View File

@ -48,6 +48,7 @@ type box struct {
func (backend *Backend) NewBox() tomo.Box {
box := &box {
backend: backend,
color: color.White,
}
box.drawer = box
box.outer = box

2
go.mod
View File

@ -5,7 +5,7 @@ go 1.20
require (
git.tebibyte.media/tomo/ggfx v0.4.0
git.tebibyte.media/tomo/tomo v0.17.0
git.tebibyte.media/tomo/typeset v0.4.0
git.tebibyte.media/tomo/typeset v0.5.0
git.tebibyte.media/tomo/xgbkb v1.0.1
github.com/jezek/xgb v1.1.0
github.com/jezek/xgbutil v0.0.0-20230603163917-04188eb39cf0

4
go.sum
View File

@ -3,8 +3,8 @@ git.tebibyte.media/tomo/ggfx v0.4.0 h1:3aUHeGS/yYWRV/zCDubBsXnik5ygkMnj/VgrM5Z75
git.tebibyte.media/tomo/ggfx v0.4.0/go.mod h1:zPoz8BdVQyG2KhEmeGFQBK66V71i6Kj8oVFbrZaCwRA=
git.tebibyte.media/tomo/tomo v0.17.0 h1:J+Sxh24o7YDls/18b86VHriilhrGYmObaMbzrYNyVaY=
git.tebibyte.media/tomo/tomo v0.17.0/go.mod h1:lTwjpiHbP4UN/kFw+6FwhG600B+PMKVtMOr7wpd5IUY=
git.tebibyte.media/tomo/typeset v0.4.0 h1:JdTmbqSJlMtdvqlwXC5AseM1GgG4tyfWcqPFGkHFRpU=
git.tebibyte.media/tomo/typeset v0.4.0/go.mod h1:PwDpSdBF3l/EzoIsa2ME7QffVVajnTHZN6l3MHEGe1g=
git.tebibyte.media/tomo/typeset v0.5.0 h1:EyLFDIIsMKYm+DLB404zbG6JMDYLvWBBbLiHJoAUlKQ=
git.tebibyte.media/tomo/typeset v0.5.0/go.mod h1:PwDpSdBF3l/EzoIsa2ME7QffVVajnTHZN6l3MHEGe1g=
git.tebibyte.media/tomo/xgbkb v1.0.1 h1:b3HDUopjdQp1MZrb5Vpil4bOtk3NnNXtfQW27Blw2kE=
git.tebibyte.media/tomo/xgbkb v1.0.1/go.mod h1:P5Du0yo5hUsojchW08t+Mds0XPIJXwMi733ZfklzjRw=
github.com/BurntSushi/freetype-go v0.0.0-20160129220410-b763ddbfe298 h1:1qlsVAQJXZHsaM8b6OLVo6muQUQd4CwkH/D3fnnbHXA=

View File

@ -42,6 +42,7 @@ func (backend *Backend) NewTextBox() tomo.TextBox {
box := &textBox {
box: backend.NewBox().(*box),
textColor: color.Black,
dotColor: color.RGBA { B: 255, G: 255, A: 255 },
}
box.box.drawer = box
box.outer = box