minor style improvements
This commit is contained in:
@ -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)
|
||||
)
|
||||
|
Reference in New Issue
Block a user