diff --git a/package.json b/package.json
index d737f1e3..d065e960 100644
--- a/package.json
+++ b/package.json
@@ -495,8 +495,8 @@
".quke"
],
"icon": {
- "dark": "./resources/scratchpad.svg",
- "light": "./resources/scratchpad.svg"
+ "dark": "./resources/dark/scratchpad.svg",
+ "light": "./resources/light/scratchpad.svg"
},
"configuration": "./language-configuration.json"
},
diff --git a/resources/metaIcons/aggicon.svg b/resources/dark/aggicon.svg
similarity index 100%
rename from resources/metaIcons/aggicon.svg
rename to resources/dark/aggicon.svg
diff --git a/resources/metaIcons/apiicon.svg b/resources/dark/apiicon.svg
similarity index 100%
rename from resources/metaIcons/apiicon.svg
rename to resources/dark/apiicon.svg
diff --git a/resources/metaIcons/dapicon.svg b/resources/dark/dapicon.svg
similarity index 100%
rename from resources/metaIcons/dapicon.svg
rename to resources/dark/dapicon.svg
diff --git a/resources/datasource-active.svg b/resources/dark/datasource-active.svg
similarity index 99%
rename from resources/datasource-active.svg
rename to resources/dark/datasource-active.svg
index 8f0e696d..e72579b8 100644
--- a/resources/datasource-active.svg
+++ b/resources/dark/datasource-active.svg
@@ -1,6 +1,6 @@
\ No newline at end of file
diff --git a/resources/datasource-connected.svg b/resources/dark/datasource-connected.svg
similarity index 99%
rename from resources/datasource-connected.svg
rename to resources/dark/datasource-connected.svg
index 8e535452..7a23bdd2 100644
--- a/resources/datasource-connected.svg
+++ b/resources/dark/datasource-connected.svg
@@ -1,6 +1,6 @@
\ No newline at end of file
diff --git a/resources/datasource.svg b/resources/dark/datasource.svg
similarity index 99%
rename from resources/datasource.svg
rename to resources/dark/datasource.svg
index e8b46bf6..778a908b 100644
--- a/resources/datasource.svg
+++ b/resources/dark/datasource.svg
@@ -1,6 +1,6 @@
\ No newline at end of file
diff --git a/resources/dark/dictionaries.svg b/resources/dark/dictionaries.svg
new file mode 100644
index 00000000..52edcfe5
--- /dev/null
+++ b/resources/dark/dictionaries.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/dark/functions.svg b/resources/dark/functions.svg
new file mode 100644
index 00000000..713fc615
--- /dev/null
+++ b/resources/dark/functions.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/metaIcons/metaicon.svg b/resources/dark/metaicon.svg
similarity index 100%
rename from resources/metaIcons/metaicon.svg
rename to resources/dark/metaicon.svg
diff --git a/resources/dark/namespaces.svg b/resources/dark/namespaces.svg
new file mode 100644
index 00000000..5e830bbc
--- /dev/null
+++ b/resources/dark/namespaces.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/dark/p-insights-active.svg b/resources/dark/p-insights-active.svg
index 45804af7..0c2b46d5 100644
--- a/resources/dark/p-insights-active.svg
+++ b/resources/dark/p-insights-active.svg
@@ -1,9 +1,12 @@
+
\ No newline at end of file
diff --git a/resources/dark/p-insights-connected.svg b/resources/dark/p-insights-connected.svg
index 3f1d2311..748c61d1 100644
--- a/resources/dark/p-insights-connected.svg
+++ b/resources/dark/p-insights-connected.svg
@@ -1,9 +1,12 @@
+
\ No newline at end of file
diff --git a/resources/dark/p-insights.svg b/resources/dark/p-insights.svg
index e1605554..7aaeed6f 100644
--- a/resources/dark/p-insights.svg
+++ b/resources/dark/p-insights.svg
@@ -1,4 +1,4 @@
+
+
\ No newline at end of file
diff --git a/resources/p-q-connection-active.svg b/resources/dark/p-q-connection-active.svg
similarity index 98%
rename from resources/p-q-connection-active.svg
rename to resources/dark/p-q-connection-active.svg
index 2e2b05dd..c9d2dc57 100644
--- a/resources/p-q-connection-active.svg
+++ b/resources/dark/p-q-connection-active.svg
@@ -6,7 +6,7 @@
+ fill="#0FBC7A" />
\ No newline at end of file
diff --git a/resources/p-q-connection-connected.svg b/resources/dark/p-q-connection-connected.svg
similarity index 98%
rename from resources/p-q-connection-connected.svg
rename to resources/dark/p-q-connection-connected.svg
index 0e2aebe0..52e7b21c 100644
--- a/resources/p-q-connection-connected.svg
+++ b/resources/dark/p-q-connection-connected.svg
@@ -6,7 +6,7 @@
+ fill="#CD3131" />
\ No newline at end of file
diff --git a/resources/p-q-connection.svg b/resources/dark/p-q-connection.svg
similarity index 98%
rename from resources/p-q-connection.svg
rename to resources/dark/p-q-connection.svg
index dfb3e84c..28ec8d60 100644
--- a/resources/p-q-connection.svg
+++ b/resources/dark/p-q-connection.svg
@@ -6,7 +6,7 @@
+ fill="#CCCCCC" />
\ No newline at end of file
diff --git a/resources/metaIcons/packageicon.svg b/resources/dark/packageicon.svg
similarity index 100%
rename from resources/metaIcons/packageicon.svg
rename to resources/dark/packageicon.svg
diff --git a/resources/python-active.svg b/resources/dark/python-active.svg
similarity index 93%
rename from resources/python-active.svg
rename to resources/dark/python-active.svg
index f2c4ff07..90274c5d 100644
--- a/resources/python-active.svg
+++ b/resources/dark/python-active.svg
@@ -1,6 +1,6 @@
\ No newline at end of file
diff --git a/resources/python-connected.svg b/resources/dark/python-connected.svg
similarity index 93%
rename from resources/python-connected.svg
rename to resources/dark/python-connected.svg
index 79122228..def2a249 100644
--- a/resources/python-connected.svg
+++ b/resources/dark/python-connected.svg
@@ -1,6 +1,6 @@
\ No newline at end of file
diff --git a/resources/python.svg b/resources/dark/python.svg
similarity index 93%
rename from resources/python.svg
rename to resources/dark/python.svg
index 703b1e9d..bd02a72b 100644
--- a/resources/python.svg
+++ b/resources/dark/python.svg
@@ -1,6 +1,6 @@
\ No newline at end of file
diff --git a/resources/metaIcons/rcicon.svg b/resources/dark/rcicon.svg
similarity index 100%
rename from resources/metaIcons/rcicon.svg
rename to resources/dark/rcicon.svg
diff --git a/resources/metaIcons/schemaicon.svg b/resources/dark/schemaicon.svg
similarity index 100%
rename from resources/metaIcons/schemaicon.svg
rename to resources/dark/schemaicon.svg
diff --git a/resources/scratchpad-active.svg b/resources/dark/scratchpad-active.svg
similarity index 97%
rename from resources/scratchpad-active.svg
rename to resources/dark/scratchpad-active.svg
index 764e49ae..840679a1 100644
--- a/resources/scratchpad-active.svg
+++ b/resources/dark/scratchpad-active.svg
@@ -3,12 +3,12 @@
xmlns="http://www.w3.org/2000/svg">
diff --git a/resources/scratchpad-connected.svg b/resources/dark/scratchpad-connected.svg
similarity index 97%
rename from resources/scratchpad-connected.svg
rename to resources/dark/scratchpad-connected.svg
index bfd203d1..54d62f00 100644
--- a/resources/scratchpad-connected.svg
+++ b/resources/dark/scratchpad-connected.svg
@@ -3,12 +3,12 @@
xmlns="http://www.w3.org/2000/svg">
\ No newline at end of file
diff --git a/resources/scratchpad.svg b/resources/dark/scratchpad.svg
similarity index 97%
rename from resources/scratchpad.svg
rename to resources/dark/scratchpad.svg
index 5e5553ad..8ec6d658 100644
--- a/resources/scratchpad.svg
+++ b/resources/dark/scratchpad.svg
@@ -3,12 +3,12 @@
xmlns="http://www.w3.org/2000/svg">
\ No newline at end of file
diff --git a/resources/dark/tables.svg b/resources/dark/tables.svg
new file mode 100644
index 00000000..c931182b
--- /dev/null
+++ b/resources/dark/tables.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/dark/variables.svg b/resources/dark/variables.svg
new file mode 100644
index 00000000..f63d3082
--- /dev/null
+++ b/resources/dark/variables.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/dark/views.svg b/resources/dark/views.svg
new file mode 100644
index 00000000..f0cc49b6
--- /dev/null
+++ b/resources/dark/views.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/light/aggicon.svg b/resources/light/aggicon.svg
new file mode 100644
index 00000000..81d31a44
--- /dev/null
+++ b/resources/light/aggicon.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/light/apiicon.svg b/resources/light/apiicon.svg
new file mode 100644
index 00000000..ae9919c1
--- /dev/null
+++ b/resources/light/apiicon.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/light/dapicon.svg b/resources/light/dapicon.svg
new file mode 100644
index 00000000..f2c6e9a6
--- /dev/null
+++ b/resources/light/dapicon.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/light/datasource-active.svg b/resources/light/datasource-active.svg
new file mode 100644
index 00000000..231af6ab
--- /dev/null
+++ b/resources/light/datasource-active.svg
@@ -0,0 +1,6 @@
+
+
\ No newline at end of file
diff --git a/resources/light/datasource-connected.svg b/resources/light/datasource-connected.svg
new file mode 100644
index 00000000..7a23bdd2
--- /dev/null
+++ b/resources/light/datasource-connected.svg
@@ -0,0 +1,6 @@
+
+
\ No newline at end of file
diff --git a/resources/light/datasource.svg b/resources/light/datasource.svg
new file mode 100644
index 00000000..f3844308
--- /dev/null
+++ b/resources/light/datasource.svg
@@ -0,0 +1,6 @@
+
+
\ No newline at end of file
diff --git a/resources/light/dictionaries.svg b/resources/light/dictionaries.svg
new file mode 100644
index 00000000..ee540e3e
--- /dev/null
+++ b/resources/light/dictionaries.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/light/functions.svg b/resources/light/functions.svg
new file mode 100644
index 00000000..2e0ed2c8
--- /dev/null
+++ b/resources/light/functions.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/light/metaicon.svg b/resources/light/metaicon.svg
new file mode 100644
index 00000000..aa8a41f4
--- /dev/null
+++ b/resources/light/metaicon.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/light/namespaces.svg b/resources/light/namespaces.svg
new file mode 100644
index 00000000..485287ce
--- /dev/null
+++ b/resources/light/namespaces.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/light/p-insights-active.svg b/resources/light/p-insights-active.svg
index 45804af7..62ca295c 100644
--- a/resources/light/p-insights-active.svg
+++ b/resources/light/p-insights-active.svg
@@ -1,9 +1,12 @@
+
\ No newline at end of file
diff --git a/resources/light/p-insights-connected.svg b/resources/light/p-insights-connected.svg
index 3f1d2311..748c61d1 100644
--- a/resources/light/p-insights-connected.svg
+++ b/resources/light/p-insights-connected.svg
@@ -1,9 +1,12 @@
+
\ No newline at end of file
diff --git a/resources/light/p-insights.svg b/resources/light/p-insights.svg
index 556b758d..31e0d520 100644
--- a/resources/light/p-insights.svg
+++ b/resources/light/p-insights.svg
@@ -1,4 +1,4 @@
+
+
\ No newline at end of file
diff --git a/resources/light/p-q-connection-active.svg b/resources/light/p-q-connection-active.svg
new file mode 100644
index 00000000..eb21e6e7
--- /dev/null
+++ b/resources/light/p-q-connection-active.svg
@@ -0,0 +1,12 @@
+
+
\ No newline at end of file
diff --git a/resources/light/p-q-connection-connected.svg b/resources/light/p-q-connection-connected.svg
new file mode 100644
index 00000000..52e7b21c
--- /dev/null
+++ b/resources/light/p-q-connection-connected.svg
@@ -0,0 +1,12 @@
+
+
\ No newline at end of file
diff --git a/resources/light/p-q-connection.svg b/resources/light/p-q-connection.svg
new file mode 100644
index 00000000..c5dbd845
--- /dev/null
+++ b/resources/light/p-q-connection.svg
@@ -0,0 +1,12 @@
+
+
\ No newline at end of file
diff --git a/resources/light/packageicon.svg b/resources/light/packageicon.svg
new file mode 100644
index 00000000..bf745c96
--- /dev/null
+++ b/resources/light/packageicon.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/light/python-active.svg b/resources/light/python-active.svg
new file mode 100644
index 00000000..03750185
--- /dev/null
+++ b/resources/light/python-active.svg
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/resources/light/python-connected.svg b/resources/light/python-connected.svg
new file mode 100644
index 00000000..def2a249
--- /dev/null
+++ b/resources/light/python-connected.svg
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/resources/light/python.svg b/resources/light/python.svg
new file mode 100644
index 00000000..2d300d2a
--- /dev/null
+++ b/resources/light/python.svg
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/resources/light/rcicon.svg b/resources/light/rcicon.svg
new file mode 100644
index 00000000..157a4f4a
--- /dev/null
+++ b/resources/light/rcicon.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/light/schemaicon.svg b/resources/light/schemaicon.svg
new file mode 100644
index 00000000..edb7a75f
--- /dev/null
+++ b/resources/light/schemaicon.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/light/scratchpad-active.svg b/resources/light/scratchpad-active.svg
new file mode 100644
index 00000000..5b4f57df
--- /dev/null
+++ b/resources/light/scratchpad-active.svg
@@ -0,0 +1,15 @@
+
+
\ No newline at end of file
diff --git a/resources/light/scratchpad-connected.svg b/resources/light/scratchpad-connected.svg
new file mode 100644
index 00000000..54d62f00
--- /dev/null
+++ b/resources/light/scratchpad-connected.svg
@@ -0,0 +1,14 @@
+
\ No newline at end of file
diff --git a/resources/light/scratchpad.svg b/resources/light/scratchpad.svg
new file mode 100644
index 00000000..579c32cc
--- /dev/null
+++ b/resources/light/scratchpad.svg
@@ -0,0 +1,14 @@
+
\ No newline at end of file
diff --git a/resources/light/tables.svg b/resources/light/tables.svg
new file mode 100644
index 00000000..b959f149
--- /dev/null
+++ b/resources/light/tables.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/light/variables.svg b/resources/light/variables.svg
new file mode 100644
index 00000000..1523ff80
--- /dev/null
+++ b/resources/light/variables.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/light/views.svg b/resources/light/views.svg
new file mode 100644
index 00000000..3470188c
--- /dev/null
+++ b/resources/light/views.svg
@@ -0,0 +1,8 @@
+
diff --git a/resources/p-insights-active.svg b/resources/p-insights-active.svg
deleted file mode 100644
index 7fbcd97f..00000000
--- a/resources/p-insights-active.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
\ No newline at end of file
diff --git a/resources/p-insights-connected.svg b/resources/p-insights-connected.svg
deleted file mode 100644
index 9e90659d..00000000
--- a/resources/p-insights-connected.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
\ No newline at end of file
diff --git a/resources/p-insights.svg b/resources/p-insights.svg
deleted file mode 100644
index efcbf65e..00000000
--- a/resources/p-insights.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
\ No newline at end of file
diff --git a/src/services/kdbTreeProvider.ts b/src/services/kdbTreeProvider.ts
index 8bb9cf85..55b20d2a 100644
--- a/src/services/kdbTreeProvider.ts
+++ b/src/services/kdbTreeProvider.ts
@@ -558,22 +558,7 @@ export class KdbNode extends TreeItem {
: "";
}
- iconPath = {
- light: path.join(
- __filename,
- "..",
- "..",
- "resources",
- "p-q-connection" + getServerIconState(this.label) + ".svg",
- ),
- dark: path.join(
- __filename,
- "..",
- "..",
- "resources",
- "p-q-connection" + getServerIconState(this.label) + ".svg",
- ),
- };
+ iconPath = getNamedIconPath("p-q-connection", this.label);
contextValue = this.label; // "root";
}
@@ -621,22 +606,7 @@ export class InsightsNode extends TreeItem {
: "";
}
- iconPath = {
- light: path.join(
- __filename,
- "..",
- "..",
- "resources",
- "p-insights" + getServerIconState(this.label) + ".svg",
- ),
- dark: path.join(
- __filename,
- "..",
- "..",
- "resources",
- "p-insights" + getServerIconState(this.label) + ".svg",
- ),
- };
+ iconPath = getNamedIconPath("p-insights", this.label);
contextValue = this.label; // "root";
}
@@ -663,7 +633,7 @@ export class InsightsMetaNode extends TreeItem {
"..",
"..",
"resources",
- "metaIcons",
+ "light",
"metaicon.svg",
),
dark: path.join(
@@ -671,7 +641,7 @@ export class InsightsMetaNode extends TreeItem {
"..",
"..",
"resources",
- "metaIcons",
+ "dark",
"metaicon.svg",
),
};
@@ -702,9 +672,16 @@ export class QNamespaceNode extends TreeItem {
"..",
"resources",
"light",
- "p-file.svg",
+ "namespaces.svg",
+ ),
+ dark: path.join(
+ __filename,
+ "..",
+ "..",
+ "resources",
+ "dark",
+ "namespaces.svg",
),
- dark: path.join(__filename, "..", "..", "resources", "dark", "p-file.svg"),
};
contextValue = "ns";
}
@@ -733,7 +710,7 @@ export class QCategoryNode extends TreeItem {
"..",
"resources",
"light",
- "p-folder.svg",
+ `${this.label.toLowerCase()}.svg`,
),
dark: path.join(
__filename,
@@ -741,7 +718,7 @@ export class QCategoryNode extends TreeItem {
"..",
"resources",
"dark",
- "p-folder.svg",
+ `${this.label.toLowerCase()}.svg`,
),
};
contextValue = this.ns; // "category";
@@ -765,7 +742,7 @@ export class MetaObjectPayloadNode extends TreeItem {
"..",
"..",
"resources",
- "metaIcons",
+ "light",
`${this.coreIcon}.svg`,
),
dark: path.join(
@@ -773,7 +750,7 @@ export class MetaObjectPayloadNode extends TreeItem {
"..",
"..",
"resources",
- "metaIcons",
+ "dark",
`${this.coreIcon}.svg`,
),
};
@@ -859,3 +836,24 @@ export class LabelNode extends TreeItem {
return TreeItemCollapsibleState.Collapsed;
}
}
+
+function getNamedIconPath(name: string, label: string) {
+ return {
+ light: path.join(
+ __filename,
+ "..",
+ "..",
+ "resources",
+ "light",
+ name + getServerIconState(label) + ".svg",
+ ),
+ dark: path.join(
+ __filename,
+ "..",
+ "..",
+ "resources",
+ "dark",
+ name + getServerIconState(label) + ".svg",
+ ),
+ };
+}
diff --git a/src/services/workspaceTreeProvider.ts b/src/services/workspaceTreeProvider.ts
index 208e97cf..c89e0359 100644
--- a/src/services/workspaceTreeProvider.ts
+++ b/src/services/workspaceTreeProvider.ts
@@ -98,12 +98,25 @@ export class FileTreeItem extends TreeItem {
state = getWorkspaceIconsState(connection.label);
}
}
- this.iconPath = Path.join(
- __filename,
- "../".repeat(2),
- "resources",
- this.baseIcon + state + ".svg",
- );
+
+ this.iconPath = {
+ light: Path.join(
+ __filename,
+ "..",
+ "..",
+ "resources",
+ "light",
+ this.baseIcon + state + ".svg",
+ ),
+ dark: Path.join(
+ __filename,
+ "..",
+ "..",
+ "resources",
+ "dark",
+ this.baseIcon + state + ".svg",
+ ),
+ };
}
private getFileIconType(fileName: string) {