diff --git a/gen/srcgen.go b/gen/srcgen.go index 0fea66b7b..44b4d1a85 100644 --- a/gen/srcgen.go +++ b/gen/srcgen.go @@ -1381,6 +1381,9 @@ var myCSSInfo = cssInfo{ {Name: "header", Provider: colors.Header}, {Name: "on-header", Provider: colors.OnHeader}, + {Name: "banding", Provider: unison.ThemeBanding}, + {Name: "on-banding", Provider: unison.ThemeOnBanding}, + {Name: "focus", Provider: unison.ThemeFocus}, {Name: "deep-focus", Provider: unison.ThemeDeepFocus}, {Name: "deeper-focus", Provider: unison.ThemeDeeperFocus}, diff --git a/go.mod b/go.mod index d8a5c8fc8..51530d8db 100644 --- a/go.mod +++ b/go.mod @@ -8,17 +8,17 @@ require ( github.com/richardwilkes/pdf v1.24.9 github.com/richardwilkes/rpgtools v1.10.1 github.com/richardwilkes/toolbox v1.114.2 - github.com/richardwilkes/unison v0.72.2-0.20240710042805-39e887657095 + github.com/richardwilkes/unison v0.72.2-0.20240816224421-ffd6ab9d487e github.com/rjeczalik/notify v0.9.3 github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef github.com/tc-hib/winres v0.3.1 github.com/vearutop/statigz v1.4.0 github.com/yookoala/realpath v1.0.0 - golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 - golang.org/x/image v0.18.0 - golang.org/x/sys v0.22.0 - golang.org/x/text v0.16.0 + golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa + golang.org/x/image v0.19.0 + golang.org/x/sys v0.24.0 + golang.org/x/text v0.17.0 ) require ( @@ -29,13 +29,13 @@ require ( github.com/go-gl/glfw/v3.3/glfw v0.0.0-20240506104042-037f3cc74f2a // indirect github.com/grandcat/zeroconf v1.0.0 // indirect github.com/kr/text v0.2.0 // indirect - github.com/miekg/dns v1.1.61 // indirect + github.com/miekg/dns v1.1.62 // indirect github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect github.com/pkg/term v1.1.0 // indirect github.com/yuin/goldmark v1.7.4 // indirect - golang.org/x/mod v0.19.0 // indirect - golang.org/x/net v0.27.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/tools v0.23.0 // indirect + golang.org/x/mod v0.20.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/tools v0.24.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 718dd3e41..4421f847d 100644 --- a/go.sum +++ b/go.sum @@ -24,8 +24,8 @@ github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NB github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/dns v1.1.61 h1:nLxbwF3XxhwVSm8g9Dghm9MHPaUZuqhPiGL+675ZmEs= -github.com/miekg/dns v1.1.61/go.mod h1:mnAarhS3nWaW+NVP2wTkYVIZyHNJ098SJZUki3eykwQ= +github.com/miekg/dns v1.1.62 h1:cN8OuEF1/x5Rq6Np+h1epln8OiyPWV+lROx9LxcGgIQ= +github.com/miekg/dns v1.1.62/go.mod h1:mvDlcItzm+br7MToIKqkglaGhlFMHJ9DTNNWONWXbNQ= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -42,8 +42,8 @@ github.com/richardwilkes/rpgtools v1.10.1 h1:TFElIf4JTbJrehDY51gFNvwNBVKTROctm+J github.com/richardwilkes/rpgtools v1.10.1/go.mod h1:qHg6Worl8Eyfv+o2+tKALvVQFxjWS8ce1SYDHRm3x8M= github.com/richardwilkes/toolbox v1.114.2 h1:4dAoJzIDZpk6IpDI8LKP/LGwFnKNxhD1ycI1mFL8YyM= github.com/richardwilkes/toolbox v1.114.2/go.mod h1:xJGESnNS91N8YxxKqfGaJMoFog4Mhi+yRGhOCX5mlrw= -github.com/richardwilkes/unison v0.72.2-0.20240710042805-39e887657095 h1:R4B4hAschJi9QDso1tEqDTnYzv4mGLdBnjzzx0dzh5Y= -github.com/richardwilkes/unison v0.72.2-0.20240710042805-39e887657095/go.mod h1:hASDhehKNorDMoPd0vNyj3iU4m0VP1XKrBUDTWxdF28= +github.com/richardwilkes/unison v0.72.2-0.20240816224421-ffd6ab9d487e h1:9CrPv+OA9uDaP8r7gSzIjHTqm50jIuzDEjlUI458uB4= +github.com/richardwilkes/unison v0.72.2-0.20240816224421-ffd6ab9d487e/go.mod h1:ks0lD2FiCPNM9N8NmUkA89tlbOdWV30oYL3U1K8PVN8= github.com/rjeczalik/notify v0.9.3 h1:6rJAzHTGKXGj76sbRgDiDcYj/HniypXmSJo1SWakZeY= github.com/rjeczalik/notify v0.9.3/go.mod h1:gF3zSOrafR9DQEWSE8TjfI9NkooDxbyT4UgRGKZA0lc= github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= @@ -64,35 +64,35 @@ github.com/yuin/goldmark v1.7.4 h1:BDXOHExt+A7gwPCJgPIIq7ENvceR7we7rOS9TNoLZeg= github.com/yuin/goldmark v1.7.4/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= -golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ= -golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E= +golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa h1:ELnwvuAXPNtPk1TJRuGkI9fDTwym6AYBu0qzT8AcHdI= +golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= +golang.org/x/image v0.19.0 h1:D9FX4QWkLfkeqaC62SonffIIuYdOk/UE2XKUBgRIBIQ= +golang.org/x/image v0.19.0/go.mod h1:y0zrRqlQRWQ5PXaYCOMLTW2fpsxZ8Qh9I/ohnInJEys= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= -golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= -golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/model/colors/colors.go b/model/colors/colors.go index 928ac9192..fdb785b1b 100644 --- a/model/colors/colors.go +++ b/model/colors/colors.go @@ -72,6 +72,7 @@ func initialize() { current = []*ThemedColor{ {ID: "surface", Title: "Surface", Color: unison.ThemeSurface}, {ID: "header", Title: "Header", Color: Header}, + {ID: "banding", Title: "Banding", Color: unison.ThemeBanding}, {ID: "focus", Title: "Focus", Color: unison.ThemeFocus}, {ID: "tooltip", Title: "Tooltip", Color: unison.ThemeTooltip}, {ID: "error", Title: "Error", Color: unison.ThemeError}, diff --git a/server/frontend/src/app_gen.css b/server/frontend/src/app_gen.css index 5d50031c8..4949e8c91 100644 --- a/server/frontend/src/app_gen.css +++ b/server/frontend/src/app_gen.css @@ -30,6 +30,8 @@ --color-on-deep-below-surface: #101010; --color-header: #2B2B2B; --color-on-header: #F0F0F0; + --color-banding: #E8E8D8; + --color-on-banding: #101010; --color-focus: #006199; --color-deep-focus: #005289; --color-deeper-focus: #00447A; @@ -61,6 +63,8 @@ --color-on-deep-below-surface: #F0F0F0; --color-header: #404040; --color-on-header: #F0F0F0; + --color-banding: #282818; + --color-on-banding: #F0F0F0; --color-focus: #0080CC; --color-deep-focus: #0071BB; --color-deeper-focus: #0061AB; diff --git a/ux/attr_panel.go b/ux/attr_panel.go index 05ed465d8..46c592880 100644 --- a/ux/attr_panel.go +++ b/ux/attr_panel.go @@ -103,13 +103,13 @@ func newAttrPanel(entity *gurps.Entity, targetMgr *TargetMgr, kind int) *AttrPan } func (a *AttrPanel) drawSelf(gc *unison.Canvas, rect unison.Rect) { - gc.DrawRect(rect, unison.ThemeSurface.Paint(gc, rect, paintstyle.Fill)) + gc.DrawRect(rect, unison.ThemeBelowSurface.Paint(gc, rect, paintstyle.Fill)) children := a.Children() for i, rowIndex := range a.rowStarts { if rowIndex > len(children) { break } - if i&1 == 1 { + if i&1 == 0 { continue } r := children[rowIndex].FrameRect() @@ -122,7 +122,7 @@ func (a *AttrPanel) drawSelf(gc *unison.Canvas, rect unison.Rect) { } r.X = rect.X r.Width = rect.Width - gc.DrawRect(r, unison.ThemeBelowSurface.Paint(gc, r, paintstyle.Fill)) + gc.DrawRect(r, unison.ThemeBanding.Paint(gc, r, paintstyle.Fill)) } } diff --git a/ux/body_panel.go b/ux/body_panel.go index 84612166a..0cd7923f8 100644 --- a/ux/body_panel.go +++ b/ux/body_panel.go @@ -67,7 +67,7 @@ func NewBodyPanel(entity *gurps.Entity, targetMgr *TargetMgr) *BodyPanel { for i, row := range p.row { var ink unison.Ink if i&1 == 1 { - ink = unison.ThemeSurface + ink = unison.ThemeBanding } else { ink = unison.ThemeBelowSurface } diff --git a/ux/description_panel.go b/ux/description_panel.go index 1c82aeca6..92dfedd98 100644 --- a/ux/description_panel.go +++ b/ux/description_panel.go @@ -72,7 +72,7 @@ func NewDescriptionPanel(entity *gurps.Entity, targetMgr *TargetMgr) *Descriptio } func (d *DescriptionPanel) drawSelf(gc *unison.Canvas, rect unison.Rect) { - gc.DrawRect(rect, unison.ThemeSurface.Paint(gc, rect, paintstyle.Fill)) + gc.DrawRect(rect, unison.ThemeBelowSurface.Paint(gc, rect, paintstyle.Fill)) children := d.Children() if len(children) == 0 { return @@ -80,11 +80,11 @@ func (d *DescriptionPanel) drawSelf(gc *unison.Canvas, rect unison.Rect) { column := children[0] children = column.Children() p := d.AsPanel() - for i := 0; i < len(children); i += 4 { + for i := 2; i < len(children); i += 4 { r := column.RectTo(children[i].FrameRect(), p) r.X = rect.X r.Width = rect.Width - gc.DrawRect(r, unison.ThemeBelowSurface.Paint(gc, r, paintstyle.Fill)) + gc.DrawRect(r, unison.ThemeBanding.Paint(gc, r, paintstyle.Fill)) } } diff --git a/ux/encumbrance_panel.go b/ux/encumbrance_panel.go index 69919a042..f28bcc851 100644 --- a/ux/encumbrance_panel.go +++ b/ux/encumbrance_panel.go @@ -66,7 +66,7 @@ func NewEncumbrancePanel(entity *gurps.Entity) *EncumbrancePanel { ink = unison.ThemeFocus } case i&1 == 1: - ink = unison.ThemeSurface + ink = unison.ThemeBanding default: ink = unison.ThemeBelowSurface } diff --git a/ux/identity_panel.go b/ux/identity_panel.go index 28358c18d..e03b14981 100644 --- a/ux/identity_panel.go +++ b/ux/identity_panel.go @@ -14,7 +14,6 @@ import ( "github.com/richardwilkes/toolbox/i18n" "github.com/richardwilkes/unison" "github.com/richardwilkes/unison/enums/align" - "github.com/richardwilkes/unison/enums/paintstyle" ) const ( @@ -53,7 +52,7 @@ func NewIdentityPanel(entity *gurps.Entity, targetMgr *TargetMgr) *IdentityPanel Bottom: 1, Right: 2, }))) - p.DrawCallback = p.drawSelf + p.DrawCallback = func(gc *unison.Canvas, rect unison.Rect) { drawBandedBackground(p, gc, rect, 0, 2, nil) } title := i18n.Text("Name") nameField := NewStringPageField(p.targetMgr, identityPanelNameFieldRefKey, title, @@ -85,14 +84,3 @@ func NewIdentityPanel(entity *gurps.Entity, targetMgr *TargetMgr) *IdentityPanel p.AddChild(orgField) return p } - -func (p *IdentityPanel) drawSelf(gc *unison.Canvas, rect unison.Rect) { - gc.DrawRect(rect, unison.ThemeSurface.Paint(gc, rect, paintstyle.Fill)) - children := p.Children() - for i := 0; i < len(children); i += 4 { - r := children[i].FrameRect() - r.X = rect.X - r.Width = rect.Width - gc.DrawRect(r, unison.ThemeBelowSurface.Paint(gc, r, paintstyle.Fill)) - } -} diff --git a/ux/misc_panel.go b/ux/misc_panel.go index 4ea52bf35..2a48d5881 100644 --- a/ux/misc_panel.go +++ b/ux/misc_panel.go @@ -15,7 +15,6 @@ import ( "github.com/richardwilkes/toolbox/i18n" "github.com/richardwilkes/unison" "github.com/richardwilkes/unison/enums/align" - "github.com/richardwilkes/unison/enums/paintstyle" ) // MiscPanel holds the contents of the miscellaneous block on the sheet. @@ -49,7 +48,7 @@ func NewMiscPanel(entity *gurps.Entity, targetMgr *TargetMgr) *MiscPanel { Bottom: 1, Right: 2, }))) - m.DrawCallback = m.drawSelf + m.DrawCallback = func(gc *unison.Canvas, rect unison.Rect) { drawBandedBackground(m, gc, rect, 0, 2, nil) } m.AddChild(NewPageLabelEnd(i18n.Text("Created"))) m.AddChild(NewNonEditablePageField(func(f *NonEditablePageField) { @@ -76,17 +75,6 @@ func NewMiscPanel(entity *gurps.Entity, targetMgr *TargetMgr) *MiscPanel { return m } -func (m *MiscPanel) drawSelf(gc *unison.Canvas, rect unison.Rect) { - gc.DrawRect(rect, unison.ThemeSurface.Paint(gc, rect, paintstyle.Fill)) - children := m.Children() - for i := 0; i < len(children); i += 4 { - r := children[i].FrameRect() - r.X = rect.X - r.Width = rect.Width - gc.DrawRect(r, unison.ThemeBelowSurface.Paint(gc, r, paintstyle.Fill)) - } -} - // UpdateModified updates the current modification timestamp. func (m *MiscPanel) UpdateModified() { m.entity.ModifiedOn = jio.Now() diff --git a/ux/sheet.go b/ux/sheet.go index 2b5912ff7..63d07701d 100644 --- a/ux/sheet.go +++ b/ux/sheet.go @@ -846,7 +846,7 @@ func drawBandedBackground(p unison.Paneler, gc *unison.Canvas, rect unison.Rect, for i := start; i < len(children); i += step { var ink unison.Ink if ((i-start)/step)&1 == 1 { - ink = unison.ThemeSurface + ink = unison.ThemeBanding } else { ink = unison.ThemeBelowSurface }