Skip to content

Commit 06a2f1b

Browse files
committed
Add config for dark theme (Doen't work, needs latest mxClient library)
1 parent b506063 commit 06a2f1b

File tree

2 files changed

+116
-7
lines changed

2 files changed

+116
-7
lines changed

src/pack.ts

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,3 +452,113 @@ export const defaultXml = `<mxStylesheet>
452452
<add as="fillColor" value="#ffffff"/>
453453
</add>
454454
</mxStylesheet>`;
455+
456+
export const defaultDarkXML = `<mxStylesheet>
457+
<add as="defaultVertex">
458+
<add as="shape" value="label"/>
459+
<add as="perimeter" value="rectanglePerimeter"/>
460+
<add as="fontSize" value="12"/>
461+
<add as="fontFamily" value="Helvetica"/>
462+
<add as="align" value="center"/>
463+
<add as="verticalAlign" value="middle"/>
464+
<add as="fillColor" value="#2a2a2a"/>
465+
<add as="strokeColor" value="#f0f0f0"/>
466+
<add as="fontColor" value="#f0f0f0"/>
467+
</add>
468+
<add as="defaultEdge">
469+
<add as="shape" value="connector"/>
470+
<add as="labelBackgroundColor" value="#2a2a2a"/>
471+
<add as="endArrow" value="classic"/>
472+
<add as="fontSize" value="11"/>
473+
<add as="fontFamily" value="Helvetica"/>
474+
<add as="align" value="center"/>
475+
<add as="verticalAlign" value="middle"/>
476+
<add as="rounded" value="1"/>
477+
<add as="strokeColor" value="#f0f0f0"/>
478+
<add as="fontColor" value="#f0f0f0"/>
479+
</add>
480+
<add as="text">
481+
<add as="fillColor" value="none"/>
482+
<add as="gradientColor" value="none"/>
483+
<add as="strokeColor" value="none"/>
484+
<add as="align" value="left"/>
485+
<add as="verticalAlign" value="top"/>
486+
</add>
487+
<add as="edgeLabel" extend="text">
488+
<add as="labelBackgroundColor" value="#2a2a2a"/>
489+
<add as="fontSize" value="11"/>
490+
</add>
491+
<add as="label">
492+
<add as="fontStyle" value="1"/>
493+
<add as="align" value="left"/>
494+
<add as="verticalAlign" value="middle"/>
495+
<add as="spacing" value="2"/>
496+
<add as="spacingLeft" value="52"/>
497+
<add as="imageWidth" value="42"/>
498+
<add as="imageHeight" value="42"/>
499+
<add as="rounded" value="1"/>
500+
</add>
501+
<add as="icon" extend="label">
502+
<add as="align" value="center"/>
503+
<add as="imageAlign" value="center"/>
504+
<add as="verticalLabelPosition" value="bottom"/>
505+
<add as="verticalAlign" value="top"/>
506+
<add as="spacingTop" value="4"/>
507+
<add as="labelBackgroundColor" value="#2a2a2a"/>
508+
<add as="spacing" value="0"/>
509+
<add as="spacingLeft" value="0"/>
510+
<add as="spacingTop" value="6"/>
511+
<add as="fontStyle" value="0"/>
512+
<add as="imageWidth" value="48"/>
513+
<add as="imageHeight" value="48"/>
514+
</add>
515+
<add as="swimlane">
516+
<add as="shape" value="swimlane"/>
517+
<add as="fontSize" value="12"/>
518+
<add as="fontStyle" value="1"/>
519+
<add as="startSize" value="23"/>
520+
</add>
521+
<add as="group">
522+
<add as="verticalAlign" value="top"/>
523+
<add as="fillColor" value="none"/>
524+
<add as="strokeColor" value="none"/>
525+
<add as="gradientColor" value="none"/>
526+
<add as="pointerEvents" value="0"/>
527+
</add>
528+
<add as="ellipse">
529+
<add as="shape" value="ellipse"/>
530+
<add as="perimeter" value="ellipsePerimeter"/>
531+
</add>
532+
<add as="rhombus">
533+
<add as="shape" value="rhombus"/>
534+
<add as="perimeter" value="rhombusPerimeter"/>
535+
</add>
536+
<add as="triangle">
537+
<add as="shape" value="triangle"/>
538+
<add as="perimeter" value="trianglePerimeter"/>
539+
</add>
540+
<add as="line">
541+
<add as="shape" value="line"/>
542+
<add as="strokeWidth" value="4"/>
543+
<add as="labelBackgroundColor" value="#2a2a2a"/>
544+
<add as="verticalAlign" value="top"/>
545+
<add as="spacingTop" value="8"/>
546+
</add>
547+
<add as="image">
548+
<add as="shape" value="image"/>
549+
<add as="labelBackgroundColor" value="#2a2a2a"/>
550+
<add as="verticalAlign" value="top"/>
551+
<add as="verticalLabelPosition" value="bottom"/>
552+
</add>
553+
<add as="roundImage" extend="image">
554+
<add as="perimeter" value="ellipsePerimeter"/>
555+
</add>
556+
<add as="rhombusImage" extend="image">
557+
<add as="perimeter" value="rhombusPerimeter"/>
558+
</add>
559+
<add as="arrow">
560+
<add as="shape" value="arrow"/>
561+
<add as="edgeStyle" value="none"/>
562+
<add as="fillColor" value="#2a2a2a"/>
563+
</add>
564+
</mxStylesheet>`;

testfiles/test.dio

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
<root>
33
<mxCell id="0"/>
44
<mxCell id="1" parent="0"/>
5-
<mxCell id="3" value="" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fillColor=#3399FF;" parent="1" vertex="1"><mxGeometry x="530" y="480" width="120" height="80" as="geometry"/></mxCell>
6-
<mxCell id="4" value="" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fillColor=#3399FF;" parent="1" vertex="1"><mxGeometry x="110" y="480" width="120" height="80" as="geometry"/></mxCell>
7-
<mxCell id="5" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitPerimeter=0;entryX=0;entryY=0.504;entryPerimeter=0;" parent="1" source="4" target="3" edge="1"><mxGeometry width="50" height="50" relative="1" as="geometry"><mxPoint x="389" y="625" as="sourcePoint"/><mxPoint x="510" y="530" as="targetPoint"/></mxGeometry></mxCell>
8-
<mxCell id="6" value=": )" style="shape=umlActor;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;html=1;" parent="1" vertex="1"><mxGeometry x="240" y="689" width="100" height="160" as="geometry"/></mxCell>
9-
<mxCell id="8" value="" style="shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;image=https://quantstack.net/img/logo.svg;" parent="1" vertex="1"><mxGeometry x="186" y="168" width="409" height="105" as="geometry"/></mxCell>
10-
<mxCell id="9" value="" style="shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;image=https://camo.githubusercontent.com/3a5e37dc07744e58761dc92794e7c6414e1cf3966aab3fadf088194c9f6b1a36/68747470733a2f2f796a732e6465762f696d616765732f6c6f676f2f796a732d313230783132302e706e67;" parent="1" vertex="1"><mxGeometry x="330" y="360" width="120" height="120" as="geometry"/></mxCell>
11-
<mxCell id="11" value="Hello world" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=22;" parent="1" vertex="1"><mxGeometry x="515" y="720" width="160" height="60" as="geometry"/></mxCell>
5+
<mxCell id="3" value="" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fillColor=#97D077;" parent="1" vertex="1"><mxGeometry x="558" y="341" width="120" height="80" as="geometry"/></mxCell>
6+
<mxCell id="4" value="" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fillColor=#FFD966;" parent="1" vertex="1"><mxGeometry x="149" y="341" width="120" height="80" as="geometry"/></mxCell>
7+
<mxCell id="6" value=": )" style="shape=umlActor;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;html=1;" parent="1" vertex="1"><mxGeometry x="170" y="490" width="100" height="160" as="geometry"/></mxCell>
8+
<mxCell id="8" value="" style="shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;image=https://quantstack.net/img/logo.svg;" parent="1" vertex="1"><mxGeometry x="209" y="168" width="409" height="105" as="geometry"/></mxCell>
9+
<mxCell id="9" value="" style="shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;image=https://camo.githubusercontent.com/3a5e37dc07744e58761dc92794e7c6414e1cf3966aab3fadf088194c9f6b1a36/68747470733a2f2f796a732e6465762f696d616765732f6c6f676f2f796a732d313230783132302e706e67;" parent="1" vertex="1"><mxGeometry x="354" y="360" width="120" height="120" as="geometry"/></mxCell>
10+
<mxCell id="10" value="" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fillColor=#7EA6E0;" parent="1" vertex="1"><mxGeometry x="354" y="545" width="120" height="80" as="geometry"/></mxCell>
1211
</root>
1312
</mxGraphModel>

0 commit comments

Comments
 (0)