Skip to content

Create polished demo videos without editing skills. Mac/Windows/Linux

update startup layout

Siddharth632baa25523f
diff --git a/dist-electron/main.js b/dist-electron/main.js
index 812f20e7..d938516d 100644
--- a/dist-electron/main.js
+++ b/dist-electron/main.js
@@ -13,18 +13,23 @@ let win;
function createWindow() {
win = new BrowserWindow({
icon: path.join(process.env.VITE_PUBLIC, "electron-vite.svg"),
- width: 360,
- height: 64,
+ width: 250,
+ height: 80,
+ minWidth: 360,
+ maxWidth: 360,
+ minHeight: 80,
+ maxHeight: 80,
frame: false,
transparent: true,
resizable: false,
alwaysOnTop: true,
+ skipTaskbar: true,
hasShadow: false,
- vibrancy: "sidebar",
webPreferences: {
preload: path.join(__dirname, "preload.mjs")
}
});
+ win.setResizable(false);
win.webContents.on("did-finish-load", () => {
win == null ? void 0 : win.webContents.send("main-process-message", (/* @__PURE__ */ new Date()).toLocaleString());
});
diff --git a/electron/main.ts b/electron/main.ts
index 9d7239c3..d9b76b47 100644
--- a/electron/main.ts
+++ b/electron/main.ts
@@ -29,19 +29,26 @@ let win: BrowserWindow | null
function createWindow() {
win = new BrowserWindow({
icon: path.join(process.env.VITE_PUBLIC, 'electron-vite.svg'),
- width: 360,
- height: 64,
+ width: 250,
+ height: 80,
+ minWidth: 360,
+ maxWidth: 360,
+ minHeight: 80,
+ maxHeight: 80,
frame: false,
transparent: true,
resizable: false,
alwaysOnTop: true,
+ skipTaskbar: true,
hasShadow: false,
- vibrancy: 'sidebar',
webPreferences: {
preload: path.join(__dirname, 'preload.mjs'),
},
})
+ // Absolutely lock the size
+ win.setResizable(false)
+
// Test active push message to Renderer-process.
win.webContents.on('did-finish-load', () => {
win?.webContents.send('main-process-message', (new Date).toLocaleString())
diff --git a/src/App.tsx b/src/App.tsx
index 86aafc9f..f146f272 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -2,35 +2,47 @@ import { useScreenRecorder } from "./hooks/useScreenRecorder";
import { Button } from "@/components/ui/button";
import { BsRecordCircle } from "react-icons/bs";
import { FaRegStopCircle } from "react-icons/fa";
-import { MdClose } from "react-icons/md";
+import { MdMonitor } from "react-icons/md";
export default function App() {
const { recording, toggleRecording } = useScreenRecorder();
return (
- <div className="w-full h-full flex flex-row items-center backdrop-blur-md px-4 gap-2">
- <Button
- variant="ghost"
- size="icon"
- className="w-8 h-8 rounded-full text-white hover:bg-transparent"
- title="Close"
- onClick={() => window.close()}
- >
- <MdClose size={18} className="text-white"/>
- </Button>
- <Button
- variant="ghost"
- size="icon"
- onClick={toggleRecording}
- title={recording ? "Stop Recording" : "Start Recording"}
- className="rounded-full flex items-center justify-center hover:bg-transparent"
- >
- {recording ? (
- <FaRegStopCircle size={16} className="text-red-500" />
- ) : (
- <BsRecordCircle size={16} className="text-white" />
- )}
- </Button>
+ <div className="w-full h-full flex items-center justify-center bg-transparent">
+ <div className="flex items-center gap-3 backdrop-blur-lg bg-white/10 rounded-full px-4 py-2 shadow-2xl border border-white/30">
+ <Button
+ variant="link"
+ size="sm"
+ className="gap-2 text-white bg-transparent hover:bg-transparent px-3"
+ onClick={() => {
+ console.log("Source button clicked");
+ }}
+ >
+ <MdMonitor size={16} className="text-white" />
+ Source
+ </Button>
+
+ <div className="w-px h-5 bg-white/30" />
+
+ <Button
+ variant="link"
+ size="sm"
+ onClick={toggleRecording}
+ className="gap-2 text-white bg-transparent hover:bg-transparent px-3"
+ >
+ {recording ? (
+ <>
+ <FaRegStopCircle size={16} className="text-white" />
+ Stop
+ </>
+ ) : (
+ <>
+ <BsRecordCircle size={16} className="text-white" />
+ Record
+ </>
+ )}
+ </Button>
+ </div>
</div>
);
}