@lvce-editor/title-bar-worker 4.20.3 → 4.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/settings.json +3 -3
- package/dist/titleBarWorkerMain.js +9 -5
- package/package.json +1 -1
package/dist/settings.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "Controls whether the active workspace or editor title is shown in the title bar.",
|
|
5
5
|
"heading": "Show Window Title",
|
|
6
6
|
"id": "titleBar.titleEnabled",
|
|
7
|
-
"type":
|
|
7
|
+
"type": "boolean",
|
|
8
8
|
"value": "false"
|
|
9
9
|
},
|
|
10
10
|
{
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"description": "Controls whether the native window controls are overlaid on the custom title bar.",
|
|
13
13
|
"heading": "Window Controls Overlay",
|
|
14
14
|
"id": "window.controlsOverlay.enabled",
|
|
15
|
-
"type":
|
|
15
|
+
"type": "boolean",
|
|
16
16
|
"value": "true"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"label": "Custom"
|
|
31
31
|
}
|
|
32
32
|
],
|
|
33
|
-
"type":
|
|
33
|
+
"type": "enum",
|
|
34
34
|
"value": "custom"
|
|
35
35
|
}
|
|
36
36
|
]
|
|
@@ -4031,11 +4031,15 @@ const measureTextWidths2 = async (texts, fontWeight, fontSize, fontFamily, lette
|
|
|
4031
4031
|
if (typeof letterSpacing !== 'number') {
|
|
4032
4032
|
throw new TypeError('letterSpacing must be of type number');
|
|
4033
4033
|
}
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4034
|
+
const rpc = await launchTextMeasurementWorker();
|
|
4035
|
+
try {
|
|
4036
|
+
const isMonospaceFont = false;
|
|
4037
|
+
const charWidth = 0;
|
|
4038
|
+
const result = await rpc.invoke('TextMeasurement.measureTextWidths', texts, fontWeight, fontSize, fontFamily, letterSpacing, isMonospaceFont, charWidth);
|
|
4039
|
+
return result;
|
|
4040
|
+
} finally {
|
|
4041
|
+
await rpc[Symbol.asyncDispose]();
|
|
4042
|
+
}
|
|
4039
4043
|
};
|
|
4040
4044
|
|
|
4041
4045
|
const measureTextWidths = async (texts, fontWeight, fontSize, fontFamily, letterSpacing) => measureTextWidths2(texts, fontWeight, fontSize, fontFamily, letterSpacing);
|