minor style improvements

This commit is contained in:
2024-06-20 22:44:15 +02:00
parent ef73f98dd0
commit fd5b147e86
3 changed files with 22 additions and 9 deletions

View File

@ -1,4 +1,5 @@
#import "@preview/cetz:0.2.2": draw
#import "consts.typ": *
#let _grp(name, desc: none, type: "default", elmts) = {
return ((
@ -12,7 +13,8 @@
#let render(x0, x1, y0, y1, group) = {
let shapes = ()
let m = measure(box(group.name))
let name = text(group.name, weight: "bold")
let m = measure(box(name))
let w = m.width / 1pt + 15
let h = m.height / 1pt + 6
shapes += draw.rect(
@ -20,7 +22,7 @@
(x1, y1)
)
shapes += draw.merge-path(
fill: gray.lighten(20%),
fill: COL-GRP-NAME,
close: true,
{
draw.line(
@ -34,7 +36,7 @@
)
shapes += draw.content(
(x0, y0),
group.name,
name,
anchor: "north-west",
padding: (left: 5pt, right: 10pt, top: 3pt, bottom: 3pt)
)