Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat: Change webcam to bottom right of screen

Richie McIlroyb6a12e5c5f1e
diff --git a/apps/desktop-solid/src/routes/camera.tsx b/apps/desktop-solid/src/routes/camera.tsx
index 9d0499e9e..7557a170c 100644
--- a/apps/desktop-solid/src/routes/camera.tsx
+++ b/apps/desktop-solid/src/routes/camera.tsx
@@ -136,12 +136,12 @@ async function resizeWindow(size: CameraWindow.Size) {
if (!monitor) return;
const scalingFactor = monitor.scaleFactor;
- const x = 100;
+ const x = monitor.size.width / scalingFactor - windowWidth - 100;
const y = monitor.size.height / scalingFactor - windowHeight - 100;
const currentWindow = getCurrentWindow();
currentWindow.setSize(new LogicalSize(windowWidth, windowHeight));
- currentWindow.setPosition(new LogicalPosition(x / scalingFactor, y));
+ currentWindow.setPosition(new LogicalPosition(x, y));
}
function createCameraPreview(deviceId: () => string | undefined) {