forked from HEL/chronos
		
	minor style improvements
This commit is contained in:
		| @@ -15,4 +15,6 @@ | ||||
| #let COLLECTIONS-DY = 3 | ||||
| #let QUEUE-PAD = (5pt, 3pt) | ||||
|  | ||||
| #let COL-DESTRUCTION = rgb("#A80238") | ||||
| #let COL-DESTRUCTION = rgb("#A80238") | ||||
| #let COL-GRP-NAME = rgb("#EEEEEE") | ||||
| #let COL-SEP-NAME = rgb("#EEEEEE") | ||||
| @@ -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) | ||||
|   ) | ||||
|   | ||||
| @@ -26,17 +26,26 @@ | ||||
|   let xr = cx + w / 2 | ||||
|  | ||||
|   y -= h / 2 | ||||
|   shapes += draw.line((x0, y), (xl, y)) | ||||
|   shapes += draw.line((xr, y), (x1, y)) | ||||
|   shapes += draw.rect( | ||||
|     (x0, y), | ||||
|     (x1, y - 3), | ||||
|     stroke: none, | ||||
|     fill: white | ||||
|   ) | ||||
|   shapes += draw.line((x0, y), (x1, y)) | ||||
|   //shapes += draw.line((x0, y), (xl, y)) | ||||
|   //shapes += draw.line((xr, y), (x1, y)) | ||||
|   y -= 3 | ||||
|   shapes += draw.line((x0, y), (xl, y)) | ||||
|   shapes += draw.line((xr, y), (x1, y)) | ||||
|   shapes += draw.line((x0, y), (x1, y)) | ||||
|   //shapes += draw.line((x0, y), (xl, y)) | ||||
|   //shapes += draw.line((xr, y), (x1, y)) | ||||
|   shapes += draw.content( | ||||
|     ((x0 + x1) / 2, y + 1.5), | ||||
|     elmt.name, | ||||
|     anchor: "center", | ||||
|     padding: (5pt, 3pt), | ||||
|     frame: "rect" | ||||
|     frame: "rect", | ||||
|     fill: COL-SEP-NAME | ||||
|   ) | ||||
|   y -= h / 2 | ||||
|   y -= Y-SPACE | ||||
|   | ||||
		Reference in New Issue
	
	Block a user