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
fix(roundness): only square the corners at 0% padding without a frame
EtienneLescot9fb20cf82fa1
diff --git a/src/components/ai-edition/RightPanes.tsx b/src/components/ai-edition/RightPanes.tsxindex 8a92d2cc7..f4793c371 100644--- a/src/components/ai-edition/RightPanes.tsx+++ b/src/components/ai-edition/RightPanes.tsx@@ -2393,10 +2393,10 @@ export function VideoEffectsPane() {><BackgroundSection />{/* #84, "how do I turn the background off", has no button of its own: Padding at 0- under Auto or an Original format frames the recording alone, and the corners go- square with it (see `roundnessFrac`). A "Fit" action did the same in one click,- but it rewrote four settings while naming none, and its menu repeated the- Original row. */}+ under Auto or an Original format frames the recording alone, and without a frame+ the corners go square with it (see `roundnessFrac`). A "Fit" action did the same+ in one click, but it rewrote four settings while naming none, and its menu+ repeated the Original row. */}<div className={styles.sectionLabel}>{ts("effects.frame")}</div>{/* The output shape moved here from the timeline toolbar. It is the one setting theother three depend on — padding, roundness and shadow only mean anything against@@ -2566,7 +2566,9 @@ export function VideoEffectsPane() {void commit();}}/>- {(scrubStartPadding ?? settings.padding) > 0 ? (+ {/* At 0% padding the corners only go square without a frame (`roundnessFrac`): under+ one, the frame meets the edges and the footage keeps the corners this sets. */}+ {(scrubStartPadding ?? settings.padding) > 0 || framed ? (<>{/* Under a frame the slider spans 0 → the most that frame wears well (the native`frame_roundness_cap`), so its travel reads as a share of that range, not asdiff --git a/src/components/ai-edition/roundnessUnderFrame.test.tsx b/src/components/ai-edition/roundnessUnderFrame.test.tsxindex 88da1a8f7..45264a3d8 100644--- a/src/components/ai-edition/roundnessUnderFrame.test.tsx+++ b/src/components/ai-edition/roundnessUnderFrame.test.tsx@@ -80,6 +80,11 @@ describe("Roundness at zero padding", () => {expect(roundness()).not.toBeInTheDocument();});+ it("stays under a frame, whose footage keeps its corners at 0%", () => {+ mount({ padding: 0, borderRadius: 20, frame: "laptop" });+ expect(roundness()).toBeInTheDocument();+ });+it("leaves on a cancelled touch as on a release", () => {mount({ padding: 30, borderRadius: 20 });fireEvent.change(padding(), { target: { value: "0" } });diff --git a/src/native/sceneDescription.test.ts b/src/native/sceneDescription.test.tsindex 346dd56f2..2e5a70443 100644--- a/src/native/sceneDescription.test.ts+++ b/src/native/sceneDescription.test.ts@@ -1213,11 +1213,15 @@ describe("buildSceneDescription.settings mapping", () => {it("squares the corners at zero padding, from a roundness it does not erase", () => {// No background to round against. The document keeps the value, so the corners come// back as they were once the padding does.- const at = (padding: number) =>- buildSceneDescription(makeDoc({ legacyEditor: { padding, borderRadius: 12 } })).effects+ const at = (padding: number, frame = "none") =>+ buildSceneDescription(makeDoc({ legacyEditor: { padding, borderRadius: 12, frame } })).effects.roundnessFrac;expect(at(0)).toBe(0);expect(at(1)).toBeCloseTo(12 / 1080, 10);+ // Under a frame the frame meets the edges at 0%, and the footage keeps its corners.+ for (const frame of ["window", "laptop", "phone", "monitor"]) {+ expect(at(0, frame)).toBeCloseTo(12 / 1080, 10);+ }});it("gives a 4K take the same roundness as a 1080p one", () => {diff --git a/src/native/sceneDescription.ts b/src/native/sceneDescription.tsindex 21584e602..18a1c13f0 100644--- a/src/native/sceneDescription.ts+++ b/src/native/sceneDescription.ts@@ -1231,9 +1231,16 @@ export function buildSceneDescription(blur: settings.showBlur,shadow: settings.shadowIntensity,// The slider is in pixels of a 1080 reference, whatever the source resolution —- // see `roundnessFrac`. No padding, no background to round against: the corners go- // square, and the stored value waits for the padding to come back.- roundnessFrac: settings.padding > 0 ? settings.borderRadius / ROUNDNESS_REFERENCE_PX : 0,+ // see `roundnessFrac`. No padding and no frame: the footage meets the scene's edges,+ // with no background to round against, so the corners go square and the stored value+ // waits for the padding to come back. Under a frame the frame meets the edges, and+ // the footage keeps its corners. A block layout's screen carries its own radius+ // (`screenRadiusFrac`), so this only ever squares Picture in Picture and camera-less+ // clips.+ roundnessFrac:+ settings.padding > 0 || settings.frame !== "none"+ ? settings.borderRadius / ROUNDNESS_REFERENCE_PX+ : 0,motionBlur: settings.motionBlurAmount,// Omitted at their defaults, like `webcamEffect`: the Rust side defaults both fields,// so a project with no frame serializes exactly as it did before they existed.