forked from HEL/chronos
		
	minor style improvements
This commit is contained in:
		| @@ -2,6 +2,7 @@ | ||||
| #let PAR-SPACE = 10 | ||||
| #let COMMENT-PAD = 8 | ||||
| #let LIFELINE-W = 10 | ||||
| #let CREATE-OFFSET = 15 | ||||
|  | ||||
| #let SYM-GAP = 5 | ||||
| #let PAR-PAD = (5pt, 3pt) | ||||
|   | ||||
| @@ -44,7 +44,7 @@ | ||||
|   if group.desc != none { | ||||
|     shapes += draw.content( | ||||
|       (x0 + w, y0), | ||||
|       text([\[#group.desc\]], weight: "bold"), | ||||
|       text([\[#group.desc\]], weight: "bold", size: .8em), | ||||
|       anchor: "north-west", | ||||
|       padding: 3pt | ||||
|     ) | ||||
|   | ||||
| @@ -340,7 +340,11 @@ | ||||
|             draw.line( | ||||
|               (x, last-y), | ||||
|               (x, line.at(1)), | ||||
|               stroke: (dash: "dashed", paint: gray.darken(40%)) | ||||
|               stroke: ( | ||||
|                 dash: "dashed", | ||||
|                 paint: gray.darken(40%), | ||||
|                 thickness: .5pt | ||||
|               ) | ||||
|             ) | ||||
|           } | ||||
|           lines.push(line) | ||||
| @@ -368,7 +372,11 @@ | ||||
|       draw.line( | ||||
|         (x, last-y), | ||||
|         (x, y), | ||||
|         stroke: (dash: "dashed", paint: gray.darken(40%)) | ||||
|         stroke: ( | ||||
|           dash: "dashed", | ||||
|           paint: gray.darken(40%), | ||||
|           thickness: .5pt | ||||
|         ) | ||||
|       ) | ||||
|  | ||||
|       // Draw lifeline rectangles (reverse for bottom to top) | ||||
|   | ||||
| @@ -120,7 +120,7 @@ | ||||
|     let m = measure(box(par.display-name)) | ||||
|     let f = if i1 > i2 {-1} else {1} | ||||
|     end-info.x -= (m.width + PAR-PAD.last() * 2) / 2pt * f | ||||
|     shapes += participant.render(x-pos, par, y: y) | ||||
|     shapes += participant.render(x-pos, par, y: y - CREATE-OFFSET) | ||||
|   } | ||||
|  | ||||
|   end-info.ll-lvl = lifelines.at(i2).level * LIFELINE-W / 2 | ||||
| @@ -146,11 +146,13 @@ | ||||
|   let style = ( | ||||
|     mark: ( | ||||
|       start: get-arrow-marks(elmt.start-tip, elmt.color), | ||||
|       end: get-arrow-marks(elmt.end-tip, elmt.color) | ||||
|       end: get-arrow-marks(elmt.end-tip, elmt.color), | ||||
|       scale: 1.2 | ||||
|     ), | ||||
|     stroke: ( | ||||
|       dash: if elmt.dashed {"dashed"} else {"solid"}, | ||||
|       paint: elmt.color | ||||
|       dash: if elmt.dashed {(2pt,2pt)} else {"solid"}, | ||||
|       paint: elmt.color, | ||||
|       thickness: .5pt | ||||
|     ) | ||||
|   ) | ||||
|  | ||||
| @@ -217,6 +219,7 @@ | ||||
|     lifelines.at(i2) = dst-line | ||||
|   } | ||||
|   if elmt.create-dst { | ||||
|     y -= CREATE-OFFSET | ||||
|     let dst-line = lifelines.at(i2) | ||||
|     dst-line.lines.push(("create", y)) | ||||
|     lifelines.at(i2) = dst-line | ||||
|   | ||||
		Reference in New Issue
	
	Block a user