Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
feat(ui): add squircle corner shape to SourceSelector and polish sources spinner ui
themaker1cdb8ed1cd21
diff --git a/src/components/launch/SourceSelector.module.css b/src/components/launch/SourceSelector.module.cssindex 51239ac8c..9d0d580e3 100644--- a/src/components/launch/SourceSelector.module.css+++ b/src/components/launch/SourceSelector.module.css@@ -2,15 +2,21 @@background: linear-gradient(135deg, rgba(28, 28, 34, 0.92) 0%, rgba(18, 18, 22, 0.88) 100%);backdrop-filter: blur(20px) saturate(160%);-webkit-backdrop-filter: blur(20px) saturate(160%);- border-radius: 14px;- box-shadow:- 0 4px 16px 0 rgba(0, 0, 0, 0.32),- 0 1px 3px 0 rgba(0, 0, 0, 0.18) inset;- border: 1px solid rgba(60, 60, 80, 0.18);+ border-radius: 30px;+ corner-shape: squircle;+ /*+ Removed box-shadow here because electron doesn't round corners of the shadow, thereby leaving a square border shadow conflicting with the rounded corners of the SourceSelector.+ The result is easily visible when you place a white window just behind the SourceSelector+ */+ /*box-shadow:+ 0 0px 16px 0 rgba(0, 0, 0, 0.32),+ 0 1px 3px 0 rgba(0, 0, 0, 0.18) inset;*/+ border: 1.5px solid rgba(60, 60, 80, 0.3);}.sourceCard {- border-radius: 12px;+ corner-shape: squircle;+ border-radius: 20px;background: linear-gradient(120deg, rgba(38, 38, 48, 0.98) 0%, rgba(24, 24, 32, 0.96) 100%);border: 1px solid rgba(60, 60, 80, 0.22);box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.18);@@ -28,7 +34,7 @@}.selected {- border: 2px solid #34b27b;+ border: 1.5px solid #34b27b;background: linear-gradient(120deg, rgba(52, 178, 123, 0.08) 0%, rgba(38, 38, 48, 0.98) 100%);box-shadow:0 0 12px rgba(52, 178, 123, 0.15),@@ -70,30 +76,27 @@}/* scrollbar */-.sourceGridScroll {- scrollbar-width: thin;- scrollbar-color: rgba(52, 178, 123, 0.5) rgba(40, 40, 50, 0.6);-}.sourceGridScroll::-webkit-scrollbar {- width: 8px;+ width: 3px;}.sourceGridScroll::-webkit-scrollbar-track {- background: rgba(30, 30, 38, 0.5);+ background: rgba(30, 30, 38, 0.3);border-radius: 4px;- margin: 4px 0;}.sourceGridScroll::-webkit-scrollbar-thumb {- background: rgba(80, 80, 100, 0.6);- border-radius: 4px;+ background: rgba(52, 178, 123, 0.5);+ border-radius: 10px;}.sourceGridScroll::-webkit-scrollbar-thumb:hover {background: rgba(52, 178, 123, 0.6);+ cursor: grab;}.sourceGridScroll::-webkit-scrollbar-thumb:active {background: rgba(52, 178, 123, 0.8);+ cursor: grabbing;}diff --git a/src/components/launch/SourceSelector.tsx b/src/components/launch/SourceSelector.tsxindex 5768c3ac7..a2aec55e4 100644--- a/src/components/launch/SourceSelector.tsx+++ b/src/components/launch/SourceSelector.tsx@@ -65,7 +65,7 @@ export function SourceSelector() {style={{ minHeight: "100vh" }}><div className="text-center">- <div className="animate-spin rounded-full h-6 w-6 border-b-2 border-[#34B27B] mx-auto mb-2" />+ <div className="animate-spin duration-500 rounded-[50%] h-6 w-6 border-2 border-b-transparent border-[#34B27B] mx-auto mb-2" /><p className="text-xs text-zinc-400">{t("sourceSelector.loading")}</p></div></div>@@ -84,10 +84,10 @@ export function SourceSelector() {<imgsrc={source.thumbnail || ""}alt={source.name}- className="w-full aspect-video object-cover rounded-lg"+ className="w-full aspect-video object-cover rounded-xl [corner-shape:squircle] "/>{isSelected && (- <div className="absolute -top-1.5 -right-1.5">+ <div className="absolute -top-1 -right-1"><div className={styles.checkBadge}><MdCheck size={12} className="text-white" /></div>@@ -111,16 +111,16 @@ export function SourceSelector() {defaultValue={screenSources.length === 0 ? "windows" : "screens"}className="flex-1 flex flex-col">- <TabsList className="grid grid-cols-2 mb-3 bg-white/5 rounded-full">+ <TabsList className="grid grid-cols-2 mb-3 bg-white/5 rounded-[14px] squircle "><TabsTriggervalue="screens"- className="data-[state=active]:bg-white/15 data-[state=active]:text-white text-zinc-400 rounded-full text-xs py-1 transition-all"+ className="data-[state=active]:bg-white/15 data-[state=active]:text-white text-zinc-400 rounded-[12px] squircle text-xs py-1.5 transition-all">{t("sourceSelector.screens", { count: String(screenSources.length) })}</TabsTrigger><TabsTriggervalue="windows"- className="data-[state=active]:bg-white/15 data-[state=active]:text-white text-zinc-400 rounded-full text-xs py-1 transition-all"+ className="data-[state=active]:bg-white/15 data-[state=active]:text-white text-zinc-400 rounded-[12px] squircle text-xs py-1.5 transition-all">{t("sourceSelector.windows", { count: String(windowSources.length) })}</TabsTrigger>@@ -128,14 +128,14 @@ export function SourceSelector() {<div className="flex-1 min-h-0"><TabsContent value="screens" className="h-full mt-0"><div- className={`grid grid-cols-2 gap-3 h-[280px] overflow-y-auto pr-1 auto-rows-min ${styles.sourceGridScroll}`}+ className={`grid grid-cols-2 gap-3 h-[280px] overflow-y-auto pt-1 pr-1.5 auto-rows-min ${styles.sourceGridScroll}`}>{screenSources.map(renderSourceCard)}</div></TabsContent><TabsContent value="windows" className="h-full mt-0"><div- className={`grid grid-cols-2 gap-3 h-[280px] overflow-y-auto pr-1 auto-rows-min ${styles.sourceGridScroll}`}+ className={`grid grid-cols-2 gap-3 h-[280px] overflow-y-auto pt-1 pr-1.5 auto-rows-min ${styles.sourceGridScroll}`}>{windowSources.map(renderSourceCard)}</div>@@ -143,18 +143,18 @@ export function SourceSelector() {</div></Tabs></div>- <div className="p-3 flex justify-center gap-2">+ <div className="p-3 justify-center flex gap-2"><Buttonvariant="ghost"onClick={() => window.close()}- className="px-5 py-1 text-xs text-zinc-400 hover:text-white hover:bg-white/5 rounded-full"+ className="px-5 py-1 text-xs text-zinc-400 hover:text-white active:scale-95 transition-transform duration-150 hover:bg-white/5 rounded-full">{tc("actions.cancel")}</Button><ButtononClick={handleShare}disabled={!selectedSource}- className="px-5 py-1 text-xs bg-[#34B27B] text-white hover:bg-[#34B27B]/80 disabled:opacity-30 disabled:bg-zinc-700 rounded-full"+ className="px-5 py-1 text-xs bg-[#34B27B] text-white active:scale-95 transition-transform duration-150 hover:bg-[#34B27B]/80 disabled:opacity-30 disabled:bg-zinc-700 rounded-full">{tc("actions.share")}</Button>diff --git a/src/index.css b/src/index.cssindex 74f5669ab..694f8bdeb 100644--- a/src/index.css+++ b/src/index.css@@ -88,6 +88,10 @@display: none; /* Chrome, Safari, Opera */}+ .squircle {+ corner-shape: squircle;+ }+/* Smooth playback scrubber */input[type="range"] {-webkit-appearance: none;