Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Commit a513e13

Browse files
committed
Merge branch 'constraintSelect' of https://github.com/DataFlowAnalysis/WebEditor into constraintSelect
2 parents 3eae274 + 4b8eeaa commit a513e13

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

src/features/constraintMenu/commands.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class ChooseConstraintCommand extends Command {
2626
const nodes = context.root.children.filter((node) => getBasicType(node) === "node") as DfdNodeImpl[];
2727
if (names.length === 0) {
2828
nodes.forEach((node) => {
29-
node.setColor("#1D1C22");
29+
node.setColor("var(--color-primary)");
3030
});
3131
return context.root;
3232
}
@@ -51,14 +51,14 @@ export class ChooseConstraintCommand extends Command {
5151
}
5252
});
5353
});
54-
if (!wasAdjusted) node.setColor("#1D1C22");
54+
if (!wasAdjusted) node.setColor("var(--color-primary)");
5555
});
5656

5757
nodes.forEach((node) => {
5858
const inTFG = node.annotations!.filter((annotation) =>
5959
this.annnotationsManager.getSelectedTfgs().has(annotation.tfg!),
6060
);
61-
if (inTFG.length > 0) node.setColor("#77777A", false);
61+
if (inTFG.length > 0) node.setColor("var(--color-highlighted)", false);
6262
});
6363

6464
return context.root;

src/features/dfdElements/elementStyles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/* Background fill of the node.
2020
When --color is unset this is just --color-primary.
2121
If this node is annotated and --color is set, it will be included in the color mix. */
22-
fill: color-mix(in srgb, var(--color-primary), var(--color, transparent) 25%);
22+
fill: color-mix(in srgb, var(--color-primary), var(--color, transparent) 40%);
2323
}
2424

2525
.sprotty-node .node-label text {

src/features/dfdElements/nodes.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ export abstract class DfdNodeImpl extends DynamicChildrenNode implements WithEdi
3939
static readonly DEFAULT_FEATURES = [...SNodeImpl.DEFAULT_FEATURES, withEditLabelFeature, containsDfdLabelFeature];
4040
static readonly DEFAULT_WIDTH = 50;
4141
static readonly WIDTH_PADDING = 12;
42-
static readonly NODE_COLOR = "#1D1C22";
43-
static readonly HIGHLIGHTED_COLOR = "#77777A";
42+
static readonly NODE_COLOR = "var(--color-primary)";
43+
static readonly HIGHLIGHTED_COLOR = "var(--color-highlighted)";
4444

4545
text: string = "";
4646
color?: string;

src/theme.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
--color-spacer: #e5e5e5;
66
--color-error: #f00;
77
--color-valid: #00b600;
8+
--color-highlighted: #77777a;
89
--color-tool-palette-hover: #ccc;
910
--color-tool-palette-selected: #bbb;
1011
--dark-mode: 0;

0 commit comments

Comments
 (0)